Notes_Module-4_COA_22BEC306C
Notes_Module-4_COA_22BEC306C
MEMORY SYSTEM
Basic Concepts:
• Maximum size of memory that can be used in any computer is determined by addressing mode.
1) Address-Line
2) Data-line &
3) Control-Line (R/W, MFC – Memory Function Completed).
• The Control-Line is used for coordinating data-transfer.
→ placing the data from the addressed-location onto the data-lines and
→ confirms this action by asserting MFC signal.
• Upon receipt of MFC signal, the processor loads the data from the data-lines into MDR.
successive memory-operations.
Cache Memory
It is a small, fast memory that is inserted between larger slower main-memory and processor.
Virtual Memory
The address generated by the processor is referred to as a virtual/logical address.
The virtual-address-space is mapped onto the physical-memory where data are actuallystored.
Only the active portion of the address-space is mapped into locations in the physical-memory.
The remaining virtual-addresses are mapped onto the bulk storage devices such as magneticdisk.
As the active portion of the virtual-address-space changes during program execution, the
MMU changes the mapping-function & transfers the data between disk and memory.
During every memory-cycle, MMU determines whether the addressed-page is in the memory.
If the page is in the memory. Then, the proper word is accessed and execution proceeds.
i) Static RAM
i) PROM
ii) EPROM
iv) Flash Memory which can be further classified as Flash Cards & Flash Drives.
• The Sense/Write circuits are connected to data-input or output lines of the chip.
2) CS’ Chip Select input selects a given chip in the multi-chip memory-system.
Static Memories:
STATIC RAM:
• Memories consist of circuits capable of retaining their state as long as power is applied are known.
• The transistors act as switches that can be opened/closed under the control of the word-line.
• When the word-line is at ground level, the transistors are turned off and the latch retain its state.
Read Operation
To read the state of the cell, the word-line is activated to close switches T1 and T2.
If the cell is in state 1, the signal on bit-line b is high and the signal on the bit-line b’ is low.
Sense/Write circuit
CMOS Cell:
• Transistor pairs (T3, T5) and (T4, T6) form the inverters in the latch (Figure).
• In state 1, the voltage at point X is high by having T5, T4 ON and T3, T6 are OFF.
• Thus, T1 and T2 returned ON (Closed), bit-line b and b’ will have high and low signals respectively.
Advantages:
1. It has low power consumption ‟ the current flows in the cell only when the cell is active”.
2. Static RAM’s can be accessed quickly. It access time is few nanoseconds.
Disadvantage:
• SRAMs are said to be volatile memories.‟ their contents are lost when poweris interrupted”.
Asynchronous DRAM:
• Less expensive RAMs can be implemented if simple cells are used.
• Such cells cannot retain their state indefinitely. Hence they arecalled Dynamic RAM (DRAM).
• The contents must be periodically refreshed by restoring this capacitor charge to its full value.
• In order to store information in the cell, the transistor T is turned “ON‟ (Figure).
• The appropriate voltage is applied to the bit-line which charges the capacitor.
• Hence, information Stored in cell can be retrieved correctly before threshold value of capacitor
drops down.
• During a read-operation,
• Many applications require non-volatile memory which retains the stored information if power isturned off.
• For ex:
OS software has to be loaded from disk to memory i.e. it requires non-volatile memory.
• Non-volatile memory is used in embedded system.
• Since the normal operation involves only reading of stored data, a memory of this type is called ROM.
At Logic value ‘0’ Transistor (T) is connected to the ground point (P).
Transistor switch is closed & voltage on bit-line nearly drops to zero (Figure).
At Logic value ‘1’ Transistor switch is open.
The bit-line remains at high voltage.
• A Sense circuit at the end of the bit-line generates the proper output value.
TYPES OF ROM:
• Different types of non-volatile memory are
1. PROM
2. EPROM
3. EEPROM &
4. Flash Memory (Flash Cards & Flash Drives)
PROM (PROGRAMMABLE ROM)
• PROM allows the data to be loaded by the user.
• User can insert 1’s at required location by burning-out fuse using high current-pulse.
• Advantages:
1) It provides flexibility.
2) It is faster.
→ a normal transistor or
→ a disabled transistor that is always turned off.
• Transistor can be programmed to behave as a permanently open switch, by injecting charge into it.
• Erasure requires dissipating the charges trapped in the transistor of memory-cells. This can be done by
• Disadvantages:
1) The chip must be physically removed from the circuit for reprogramming.
• Disadvantage: It requires different voltage for erasing, writing and reading the stored data.
FLASH MEMORY
• In EEPROM, it is possible to read & write the contents of a single cell.
• In Flash device, it is possible to read contents of a single cell & write entire contents of a block.
Eg. In MP3 player, the flash memory stores the data that represents sound.
• Single flash chips cannot provide sufficient storage capacity for embedded-system.
• Advantages:
1) Flash drives have greater density which leads to higher capacity & low cost per bit.
• There are 2 methods for implementing larger memory: 1) Flash Cards & 2) Flash Drives
1) Flash Cards
One way of constructing larger module is to mount flash-chips on a small card.
Eg: A minute of music can be stored in 1MB of memory. Hence 64MB flash cards can store an
hour of music.
2) Flash Drives
Larger flash memory can be developed by replacing the hard disk-drive.
The flash drives are designed to fully emulate the hard disk.
The flash drives are solid state electronic devices that have no movable parts.
Advantages:
1) They have shorter seek & access time which results in faster response.
Disadvantages:
1) The capacity of flash drive (<1GB) is less than hard disk (>1GB).
CACHE MEMORIES
• The effectiveness of cache mechanism is based on the property of Locality of Reference.
Locality of Reference
• Many instructions in the localized areas of program are executed repeatedly during some time period
1) Temporal
The recently executed instructions are likely to be executed again very soon.
2) Spatial
Instructions in close proximity to recently executed instruction are also likely to be executed soon.
• If active segment of program is placed in cache-memory, then total execution time can be reduced.
• This number of blocks is small compared to the total number of blocks available in main-memory.
• Cache control hardware decides which block should be removed to create space for the new block.
• The collection of rule for making this decision is called the Replacement Algorithm.
• The cache control-circuit determines whether the requested-word currently exists in the cache.
Write-Through Protocol
Here the cache-location and the main-memory-locations are updated simultaneously.
Write-Back Protocol
This technique is to
During Read-operation
• If the requested-word currently not exists in the cache, then read-miss will occur.
Load–Through Protocol
The block of words that contains the requested-word is copied from the memory into cache.
After entire block is loaded into cache, the requested-word is forwarded to processor.
During Write-operation
• If the requested-word not exists in the cache, then write-miss will occur.
3) If Write Through Protocol is used, the information is written directly into main-memory.
→ then block containing the addressed word is first brought into the cache &
→ then the desired word in the cache is over-written with the new information.
1) Magnetic Disk
3) Magnetic Tapes.
Magnetic DISK
• Magnetic Disk system consists of one or more disk mounted on a common spindle.
• Disk is placed in a rotary-drive so that magnetized surfaces move in close proximity to R/W heads.
• Digital information is stored on magnetic film by applying current pulse to the magnetizing-coil.
• Only changes in the magnetic field under the head can be sensed during the Read-operation.
• Therefore, if the binary states 0 & 1 are represented by two opposite states, then a voltage is induced in the
• Manchester Encoding technique is used to combine the clocking information with data.
• R/W heads are maintained at small distance from disk-surfaces in order to achieve high bit densities.
• When disk is moving at their steady state, the air pressure develops b/w disk-surfaces & head. This air
• The read/write heads can operate closure to magnetic track surfaces because the dust particles which are a
Advantages
• It has a larger capacity for a given physical size.
• The data intensity is high because the storage medium is not exposed to contaminating elements.
• The disk system has 3 parts: 1) Disk Platter (Usually called Disk)
2) Disk-drive (spins the disk & moves Read/write heads)
• The set of corresponding tracks on all surfaces of a stack of disk form a Logical Cylinder.
• The data are accessed by specifying the surface number, track number and the sector number.
• The formatting process divides the disk physically into tracks and sectors.
C O M P U T E R O R G A N I Z A T I O N | M O D U L E 4 : M E M OR Y S Y S T E M 18E C 35
• The formatting process may discover some defective sectors on all tracks.
DISK Controller
• The disk controller acts as interface between disk-drive and system-bus.
• The disk controller uses DMA scheme to transfer data between disk and memory.
• When the OS initiates the transfer by issuing R/W‟ request, the controllers register will load the
following information:
1) Memory Address: Address of first memory-location of the block of words involved in the
transfer.
2) Disk Address: Location of the sector containing the beginning of the desired block of words.
1) Seek - Causes disk-drive to move the R/W head from its current position to desired track.
2) Read - Initiates a Read-operation, starting at address specified in the disk-address register. Data
read serially from the disk are assembled into words and placed into the data buffer for
transfer to the main-memory.
3) Write - Transfers data to the disk.
4) Error Checking - Computes the error correcting code (ECC) value for the data read from a
given sector and compares it with the corresponding ECC value read from the disk.
In case of a mismatch, it corrects the error if possible;
Otherwise, it raises an interrupt to inform the OS that an error has occurred.