Professional Documents
Culture Documents
409 Part 2 (Chapter 6)
409 Part 2 (Chapter 6)
Memory is a storage device used to hold programs, data, results, etc. Three types of memory are
prevalent in modern computers - Semiconductor, Magnetic, and Optical memory. Of these,
Semiconductor memory is faster, more compact, consumes less power but is more expensive. In
contrast, Magnetic and Optical memories are slower but cheaper.
Secondary memory is used for bulk storage of programs, data, system software, assemblers,
compilers, and large-data files. It should not be volatile, meaning it should be able to store
information permanently. Magnetic memory, such as hard disks, are commonly used as
secondary memories due to these properties.
**Check textbook for diagram here
The chapter discusses two types of cache schemes, write-through and write-back. In a
write-through cache, the main memory is updated each time the CPU writes into the cache. This
approach ensures data consistency between the cache and main memory, which is particularly
beneficial in systems that use direct memory access (DMA) for data transfer. However, this can
also slow down the CPU if it has to wait for the write operation in the main memory to complete.
To address this issue, a write buffer is introduced for temporary storage of write requests. This
allows the CPU to proceed to the next instruction without waiting for the main memory to be
updated. The contents of this buffer are then sent to the main memory when it is not occupied
with read requests, effectively optimizing the overall memory operations and enhancing system
performance.
In a write-back cache, only the cache memory is updated during a write operation with updated
locations in the cache marked by flags for later copying into the main memory. This method
minimizes bus utilization and avoids unnecessary system bottlenecks, thereby enhancing
performance. Additionally, a write buffer is utilized in the write-back cache scenario, which
temporarily holds flagged blocks of data earmarked for removal from the cache. This buffer
mechanism allows the CPU to quickly fetch new blocks of data from the main memory without
having to wait for space to be made in the cache, effectively streamlining the data access process
and maintaining optimal system performance.
Cache memory is available at multiple levels, known as first-level cache (L1), second-level
cache (L2), and third-level cache (L3). These caches can be located either within (internal cache)
or outside (external cache) the microprocessor.
The section also details specific cache controllers like Intel's 82496, 82497, and 82498 developed
for controlling second-level cache memory in Pentium-based computers. Intel's 82496 and 82497
cache controllers support a memory bus width of 32, 64, and 128-bit and line sizes of 16, 32, and
64 bytes. They manage 256KB and 512KB cache memories. The 82498 controller, meanwhile,
supports 64 and 128-bit wide memory bus, line sizes of 32 and 64 bytes, and manages larger
cache memory from 1MB to 2MB. These controllers control the 82491, 82492, and 82493
SRAM cache memories, respectively. In the latest Pentium processors, the second-level cache
and its controller are integrated into the processor.
The process of moving program parts between main memory and secondary memory is called
swapping, enabling programs requiring larger memory capacity than the main memory to
execute. Virtual memory space is typically much larger than physical memory space. For
instance, the Intel 80386 can directly address GBs of physical memory, but its virtual memory
addressing capacity is 64 TB.
Programs use logical addresses, which are translated into physical addresses by the Memory
Management Unit (MMU). The MMU resides between the processor and the main memory and
determines whether a logical address generated by the CPU is present in the physical memory. If
the address isn't in the main memory, the MMU interrupts the CPU to load the required
information from the secondary memory. Logical addresses are also referred to as virtual
addresses in a system equipped with virtual memory.
Flash Memory/SSD
These are non-volatile, electrically erasable, and programmable permanent type memories with
high reliability, low power consumption, high packing density, and lower cost. They're available
as flash cards and flash drives. An example is the Samsung 970 EVO Plus, a high-performance
SSD.
Non-Volatile RAM
This is a type of RAM that retains information even when the system's power is turned off. This
is useful in applications where it is critical that data not be lost, such as in embedded systems and
critical data storage. An example is the STMicroelectronics M48Z02, a 2K x 8 zero-power
SRAM.
Bit-oriented memory chips, like those rated 256M x 1 bit store one bit per memory cell, allowing
each bit to be addressed and read or written individually. Nibble-oriented memory chips, like
those rated 256 K x 4 bits, store a nibble (four bits) per cell with each nibble individually
addressable and operable.
Byte-oriented memory chips store a byte (eight bits) per cell, and each byte can be individually
addressed. An example would be a chip rated as 4M x 8 bits, or 4M x 9 bits if a parity bit is
included for error detection.
Intel 8206 is an error detection and correction unit that provides error detection and correction
for static and dynamic RAMs. It can detect and correct all single-bit errors, and detect all
double-bit and higher multiple bit errors. It uses a modified Hamming code for error detection
and correction.
Two data recording techniques are used: longitudinal recording and vertical recording, with the
latter allowing more data storage. A read head, which is a magnetoresistive (MR) sensor, is used
to read data. Changes in the MR sensor's electrical resistance, caused by the direction of
magnetization of the moving medium under it, are detected as voltage signals.
Some older and low-capacity disks use a single head for both reading and writing operations.
The direction of magnetization of a very small area of the magnetic film determines the polarity
of electric pulses produced during the read operation. Modern computers typically use magnetic
disks, including hard disks and floppy disks, and magnetic tapes as types of magnetic memory.
The disks, which are semi-random devices, are mounted on a rotary drive to rotate. The
read/write head remains stationary on the addressed track, while the disk rotates to bring the
addressed sector under the read/write head. The sum of the time required to move the read/write
head to the addressed track (seek time) and the time required to bring the starting position of the
addressed sector under the read/write head (latency time) is known as access time.
A disk controller is required for magnetic disk drives. Its functions include interfacing a disk
drive system to the CPU, disk drive selection, track and sector selection, issuing read/write
commands to the disk drive system, data separation, serial-to-parallel and parallel-to-serial
conversion, and error detection. Data to be stored on a magnetic disk must be converted from
byte form to serial format, and vice versa for data read from a magnetic disk.
Hard disks' capacity ranges from 40 GB to 750 GB, with access times between 5 and 10
milliseconds. To address mismatched data transfer rates between the main memory and hard disk
memory, a semiconductor memory known as a disk cache is used. In Redundant Arrays of
Independent Disks (RAID) systems, multiple disks operate in parallel, storing the same
information to bolster storage reliability. Additionally, removable and external hard disks are
available for backup memory. An important note on hard disk operation is that an air cushion
generated by high-speed rotations keeps the read/write head off the disk surface. This prevents
damage but also necessitates a dust-free environment to avoid head crashes, which lead to data
loss.
Integrated Drive (or Device) Electronic (IDE) and Small Computer System Interface (SCSI) are
host adapters, not controllers. Enhanced IDE (EIDE) can interface hard disk drive, floppy disk
drive, optical disk drive, and tape drive. IDE or EIDE drives offer great ease of use, and one can
just plug them in to work. ATA is AT Attachment, and ATAPI is AT Attachment Packet Interface,
which are specifications for EIDE.
SCSI has a separate I/O bus called the SCSI bus. It can connect up to 15 devices, each with a
unique identification number. The latest version of SCSI, called SCSI-3, offers a data transfer
rate of 80 MB/s. SATA (Serial ATA) is a serial interface used for connecting motherboards to
various mass storage devices. With different versions, it offers a wide range of data transfer rates
and has a CRC mechanism for error detection. SATA Express and eSATA expand the SATA
capabilities with high-speed data transfer and external connectivity, respectively. On the other
hand, SAS (Serial Attached SCSI) improves upon traditional SCSI, using a serial mode of data
transmission and supporting a large number of hard disk drivers.
Magnetic tapes contain vertical columns known as frames and horizontal rows known as tracks.
For error checking, parity bits are used to detect single-bit errors, while longitudinal parity bits
are introduced to detect multi-bit errors. Special labels and markers on the tape assist in
identifying tape contents, storing control information, signaling the end of a file, and marking the
beginning and end of the usable tape.
To improve tape utilization, multiple records can be grouped together in a block and recorded as
a single unit on the tape, with specific programs available to separate records within a block for
processing
6.12.2 Protection
Protection is crucial in a multiuser system to prevent interference between users or with the
operating system. The MMU provides this protection by checking the privilege-level of a
program requesting memory access. This mechanism is used to protect the operating system
from the users.
6.12.3 MC68851
MC68851 is a memory management unit developed by Motorola that uses the paging technique
for memory division. It is widely used with the 68000 family of microprocessors.