Memory
Original Scanned PDF – View Notes
Memory Hierarchy
- Memory hierarchy is organization of memory such it can minimize access time.
- It is divided into five level based on speed as well as use.
Levels of Memory
1. Register
- Register are present inside the CPU.
- Least access time.
- Most expensive and smallest in size.
- Available in KB size.
2. Cache
- Store frequently used instruction & data.
- Available in MB size.
- Made up of SRAM.
3. Primary or Main Memory
- Directly communicates with CPU and auxiliary devices.
- Available in GB size.
- Made up of DRAM.
4. Secondary Memory
- Used as backup storage.
- Available in few TB.
5. Tertiary Memory
- Used to store removable files.
- Cheapest and largest in size.
- Available in PB.
Different Types of Memory – Cache Memory
- Cache memory is very high speed memory.
- Acts as buffer between RAM and CPU.
- It holds frequently requested data and instruction so that they are immediately available to the CPU when needed.
Processor first checks for the data in the cache.
- If the processor finds that data in the cache, it is called cache hit.
- If it doesn’t find, it is called cache miss.
Primary Memory & Secondary Memory
| S.N. | Primary Memory | Secondary Memory |
|---|---|---|
| 1. | Primary memory is the main memory of computer system. | It refers to auxiliary memory, external memory or secondary memory. |
| 2. | It is a volatile memory. | It is non-volatile memory. |
| 3. | Data is directly accessed by the CPU. | Data is not directly accessed by the CPU. |
| 4. | It is faster but have less storage. | It is slower but have more storage. |
| 5. | Very expensive. | Significantly cheaper. |
| 6. | Eg. RAM / ROM. | Eg. HDD / SSD. |
Characteristics of Memory System
1. Location
Memory can be either be stored externally or internally (like RAM).
- CPU
- Internal or main memory
- External or secondary memory
2. Capacity
Capacity of any memory device can be expressed in terms of:
- Word size
- Number of words
3. Unit of Transfer
It is maximum number of bits read or written into the memory at a time.
It is mostly equal to word size in case of main memory.
4. Access Method
Way of searching the storage device is called access method.
It is four types:
- Direct Access Method or Direct Access Memory
- Sequential Access Method or Sequential Access Memory
- Random Access Method or Random Access Memory
- Associative Access Method or Associative Access Memory
Commonly used word size are 1 byte, 2 byte and 4 byte.
If a memory device is given as 4K × 16, this means:
word size = 16
number of words = 4K or 4096.
5. Performance
It is determines by using 3 parameter:
- Memory cycle time
- Access time
- Transfer Rate
SRAM and DRAM
| S.N. | SRAM | DRAM |
|---|---|---|
| 1. | It stand for static-RAM. | It stand for Dynamic-RAM. |
| 2. | Made up of Transistor. | Made up of capacitor. |
| 3. | Faster but expensive. | Slower and cheap. |
| 4. | Smaller in size. 2–16 MB | Larger in size. 2–16 GB |
| 5. | Less dense. | Higher dense. |
| 6. | Mostly use in this time. | Rarely use in this time. |
| 7. | Memory position is in the processors. | Memory position is in the motherboard. |
| 8. | Modules are simpler. | Modules are complex. |
Magnetic Disk and How Does It Work
- A magnetic disk is a types of secondary memory that consist of a flat disc with a magnetic coating that store data.
- IBM introduced the first magnetic hard drive in 1956. It could only store 5MB data.
- Data can be easily edited, remove and provides data access at an time.
Structure of Magnetic Disk
Internal Structure of Platter
- The disk surface is divided into tracks which are concentric circles.
- Tracks are further divided into sectors.
- Sectors are used to store data in a disc.
- Each track may have 8 or more sectors.
- Read/write head is connected to a disc arm that moves the head.
- Motor moves the disc at a speed of 100 times per second.
Memory Management Unit
- MMU is a hardware that control the processor’s memory and caching operations.
- It is located within computer’s CPU.
- All data request are sent to the MMU which is turn determines from where data need to be retrieved.
Three Main Functions
- Hardware Memory Management
- Operating System’s Memory Management
- Application Memory Management
Memory Address
- A memory address is a reference to a specific memory location in RAM to find where is data stored.
- The memory location are addressed from 0 to 2k − 1.
Flash Drive
- Permanent storage device which can store data for long period of time.
- Plug and play device.
- Small in size and easy to use.
- Easy to carry from one location to another location.
- Faster than optical device.
- Large data storage capacity is large in size. (256 GB)
- Back up data.
- Example: pen drive, Memory card etc.
- Flash Memory is connected to computer through USB port.
DVD – Read Write
- DVD-RW is stand for Digital versatile Disc – Read write.
- Data are easily rewritable many times.
- It looks like compact disc.
- It is an optical disc which works on laser beam.
- Used to backup data.
Error Correcting Codes
- When bits are transmitted over the computer network, they get corrupted due to interference and network problems.
- Error detection techniques are responsible for checking whether an error has occurred or not in the frame.
- For error detection, sender need to send additional bits along with data bits.
- Receiver performs necessary check based upon the additional redundant bits.
- Among many techniques for detecting error in data frames, most popular parity check.
Parity Check
Sender’s End: While creating a frame the sender counts the number of 1s in it and adds the parity bit as follows.
1. In Case of Even Parity
- If number of 1s is even the parity bit is 0.
- If number of 1s is odd the parity bit is 1.
2. In Case of Odd Parity
- If number of 1s is odd the parity bit is 0.
- If number of 1s is even the parity bit is 1.
Example data frame: 1001101
Frame with even parity: 0 1001101
Frame with odd parity: 1 1001101
Hamming Code
- Hamming code is a error correction code that can be used to detect and correct the error.
- Developed by RW Hamming.
- Sender encodes data bits with redundant bits.
At Sender’s End
- Calculate number of redundant bits.
- Position the redundant bits.
- Calculate value of each redundant bit.
Example: Message = 1001
| Position | P1 | P2 | P4 |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 |
| 2 | 0 | 1 | 0 |
| 3 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 |
| 5 | 1 | 0 | 1 |
| 6 | 1 | 1 | 0 |
| 7 | 1 | 1 | 1 |
1 0 0 1 1 0 0
1 1 0 1 1 0 0
110 = (6)₁₀
1001100
Memory Packaging and Memory Modules
Memory Packaging
- Memory package is a small circuit board that contain memory chips.
- SIMM, DIMM and RIMM are some of the memory package.
Memory Modules
1. Single In-line Memory Module (SIMM)
- A SIMM consists of memory chips soldered onto a printed circuit Board (PCB).
- 72 pin, SIMM transfers 32 bits of data a time, therefore in modern micro computers with a 64 bit data bus two SIMMs have to be paired up in order to functions.
2. Dual In-line Memory Module (DIMM)
- DIMM is 168 pin package.
- It is double sided memory modules.
- It supports 64-bit, 72 bit or 80 bit.
- It consumes 3.3 volt of power.
- Modern computer use DIMM.
3. Rombus Inline Memory Module (RIMM)
- RIMM is same as DIMM but it only differs in the pin configuration.
- The high bandwidth and low latency application use this memory package.
- The consume 2.5 volt of power.
Discussion
Share a helpful question, idea, or explanation with other students.