BCS302 · COMPUTER ORGANIZATION AND ARCHITECTURE · Unit 4
Memory
Unit Scope & Exam Weightage: This unit covers the full storage spectrum: the basic concept and hierarchy, semiconductor RAM (SRAM/DRAM), 2D and 2½D memory organisation, ROM memories, cache concept, design issues and performance, address mapping and replacement, auxiliary memories (magnetic disk, magnetic tape and optical disks) and virtual memory. The solutions corpus records 12 PYQ clusters worth about 69 marks — five of them 7-mark cache/mapping or disk numericals. A student who can split a cache address into tag/set/word fields and write the effective-access-time formula is guaranteed a large share of this unit's marks.
Front Page: Importance-Wise Topic Roadmap (2023–26 PYQs)
| Priority | Topic (Exact Syllabus) | PYQs Asked | Marks Weightage | Tag |
|---|---|---|---|---|
| 1 | address mapping and replacement Auxiliary memories: magnetic disk | 5 (2023-24 ×3, 2024-25, 2025-26) |
7m × 5 | Survival Mode Numerical |
| 2 | Basic concept and hierarchy | 2 (2024-25, 2025-26) |
7m + 7m | Core Concept Diagram |
| 3 | 2D & 2 1/2D memory organization | 2 (2023-24, 2025-26) |
7m + 2m | Core Concept |
| 4 | semiconductor RAM memories | 1 (2024-25) |
7m | Comparison |
| 5 | ROM memories | 1 (2024-25) |
2m | Core Concept |
| 6 | Cache memories: concept and design issues & performance | 1 (2023-24) |
2m | Core Concept |
| 7 | magnetic tape and optical disks Virtual memory: concept implementation | 0 direct | — | Predicted |
2-Hour Last-Night Survival Checklist:
- Cache mapping (#1 Priority): Memorise the address split —
tag | set/block index | word offset. Direct = one line per block (); set-associative = lines per set (); fully associative = no index, full tag search. - Two guaranteed numericals: (a) main memory with 1k cache and 4-word blocks → tag 6, block 8, word 2 bits; 256 cache blocks; (b) set-associative M1/M2 problem → tag 11, set 6, word 3 bits and EAT ≈ 70 ns.
- Hierarchy pyramid (#2 Priority): Draw registers → cache → main memory → magnetic disk → tape/optical, labels "faster/smaller/costlier per bit" on top and "slower/larger/cheaper" at the bottom; add temporal + spatial locality as the justification.
- Memory tables (#3/#4 Priority): SRAM (6T, no refresh, fast, cache) vs DRAM (1T1C, refresh, dense, main memory); 2D (one decoder, one row = one word) vs 2½D (row + column decoders, fewer sense amplifiers).
- Auxiliary memory (#1 Priority): Disk access time =
seek + rotational latency + transfer + controller overhead, with average rotation seconds; tape is sequential/backup, optical is laser/WORM or rewritable.
1. Basic Concept and Memory Hierarchy
Memory (2 Marks): Memory is the storage subsystem that holds instructions and data for the processor. The memory hierarchy arranges several memory levels so that the CPU sees the speed of the fastest level and the capacity/cost of the largest level.
1.1 The Hierarchy Pyramid
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart TD
R["Registers<br/>~1 ns, few hundred bytes"] --> C["Cache (SRAM)<br/>~1-10 ns, KB-MB"]
C --> M["Main memory (DRAM)<br/>~50-100 ns, GB"]
M --> D["Magnetic disk / SSD<br/>~ms, hundreds of GB-TB"]
D --> T["Tape / optical<br/>seconds, archival"]
| Level | Technology | Access time | Capacity | Cost per bit | Managed by |
|---|---|---|---|---|---|
| Registers | Flip-flops | < 1 ns | Bytes | Highest | Compiler / hardware |
| Cache | SRAM | 1–10 ns | KB–MB | High | Hardware |
| Main memory | DRAM | 50–100 ns | GB | Medium | OS + hardware (virtual memory) |
| Disk / SSD | Magnetic / flash | 0.1–10 ms | TB | Low | OS (files, paging) |
| Tape / optical | Magnetic / laser | seconds | Archival | Lowest | Operator / backup software |
is the hit ratio and the access time of level . The design goal is a high so the average approaches the fast level's .
1.2 Chip-Expansion Arithmetic
For a chip of organisation ( words, bits per word):
- address lines ;
- chips for word expansion ;
- chips for bit expansion ;
- total chips product of the two expansions.
A chip needs address lines. A memory needs such chips.
Examiner Tip: On the hierarchy question, never stop at the picture. Add the two locality reasons, the hit-ratio formula and one chip-count calculation — these are the numbered step marks in the 7-mark answer.
After-Topic PYQ (
2025-26 Sec C Q4b— 7 Marks): Explain the memory hierarchy with diagram. A memory chip has a capacity of . (i) Find the number of address lines required. (ii) How many such chips are needed to design a memory system?
After-Topic PYQ (
2024-25 Sec C Q6a— 7 Marks): Design and explain the fundamental concept of computer memory hierarchy?
2. Semiconductor RAM Memories
RAM: Random Access Memory whose words can be read or written in roughly constant time. Two families dominate: SRAM (static, flip-flop cell) and DRAM (dynamic, capacitor cell).
2.1 SRAM vs DRAM
| Feature | SRAM | DRAM |
|---|---|---|
| Cell | 6-transistor flip-flop | 1 transistor + 1 capacitor (1T1C) |
| Storage | Latch holds state while powered | Charge on capacitor leaks away |
| Refresh | Not needed | Needed every ~16–64 ms |
| Read | Non-destructive | Destructive; sense amp restores charge |
| Speed | Fast (1–10 ns) | Slower (50–100 ns) |
| Density / cost | Low density, expensive per bit | Very dense, cheap per bit |
| Use | CPU cache, register files | Main memory, frame buffer |
2.2 DRAM Operation and Refresh
write: word line HIGH → bit line drives capacitor charge
read : word line HIGH → charge shares with bit line → sense amp detects and restores
refresh: periodically read every row and restore its charge (RAS-only refresh)
A 1T1C cell stores a 1 as a charged capacitor and a 0 as discharged. Because reading disturbs the charge, DRAM requires a sense amplifier and a refresh cycle; this is why DRAM is dense but slower than SRAM.
Examiner Tip: The full-credit SRAM/DRAM answer has four scored blocks: cell circuit, read/write mechanism, refresh requirement, and an application table. Writing only "SRAM is fast, DRAM is cheap" earns roughly 2 of 7 marks.
After-Topic PYQ (
2024-25 Sec C Q6b— 7 Marks): Describe the architecture and operation of semiconductor RAM (Random Access Memory) memories such as DRAM (Dynamic RAM) and SRAM (Static RAM)?
3. 2D & 2 1/2D Memory Organization
2D organisation: cells are arranged as a single array of rows × columns; one -to- row decoder selects one complete word and sense amplifiers read it. 2½D organisation: a row decoder and a column decoder/multiplexer both participate, so a small word is selected from a large row.
3.1 Structural Comparison
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart LR
subgraph TD["2D: one decoder"]
A["k address bits"] --> RD["Row decoder<br/>selects 1 of 2^k words"]
RD --> WA["m-bit word out<br/>m sense amplifiers"]
end
subgraph TD2["2½D: two decoders"]
B["row address"] --> R2["Row decoder"]
C["column address"] --> C2["Column decoder / mux"]
R2 --> ARR["Cell matrix"]
C2 --> ARR
ARR --> W2["m-bit word out<br/>few sense amplifiers"]
end
| Feature | 2D | 2½D |
|---|---|---|
| Decoders | One (row) | Two (row + column) |
| Sense amplifiers | One per bit of the word () | Only for the selected slice, shared |
| Word selection | Entire row is the word | Small word picked from a long row |
| Address split | All bits to row decoder | Split into row and column fields |
| Scaling | Large memories need very long rows | Better for large capacity |
| Speed | Faster, one decode step | Slightly slower, two decode steps |
| Hardware | Simpler, more sense amps | More decoder logic, fewer sense amps |
Advantages/disadvantages: 2D is simple and fast but wasteful of sense amplifiers for big arrays; 2½D saves area and power by sharing sense amplifiers but pays an extra column-decode delay.
Examiner Tip: Draw a square cell matrix for 2½D and label the row decoder and column multiplexer. State the trade-off sentence verbatim: "fewer sense amplifiers and better scaling, at the cost of two-step decoding and extra delay".
After-Topic PYQ (
2025-26 Sec C Q5b— 7 Marks): Explain 2D and 2D memory organization. Write their advantages and disadvantages.
After-Topic PYQ (
2023-24 Sec A Q1f— 2 Marks): Define D memory organization.
4. ROM Memories
ROM (Read Only Memory): non-volatile semiconductor memory used for data that must survive power-off. It is written once or reprogrammed rarely and read many times.
| Type | Programming | Erasure | Typical use |
|---|---|---|---|
| Mask ROM | During fabrication | None | Fixed boot code, lookup tables |
| PROM | Fuses blown by programmer | None | Small production runs |
| EPROM | UV light through window | UV erase | Development firmware |
| EEPROM | Electrical byte write | Electrical byte erase | Configuration, calibration data |
| Flash | Electrical block write | Electrical block erase | BIOS, SSD, USB drives |
Purpose: store the boot loader/firmware, microcode, character generators and constants; because ROM is non-volatile, the machine has a valid start-up instruction after power-on.
Examiner Tip: For 2 marks, write "non-volatile, read-mostly, holds boot firmware" and name PROM/EPROM/EEPROM/flash. Adding one concrete use (BIOS or SSD) secures the full mark.
After-Topic PYQ (
2024-25 Sec A Q1f— 2 Marks): Explain the purpose of ROM memories in computer systems?
5. Cache Memories: Concept, Design Issues & Performance
Cache: a small, fast SRAM buffer between CPU and main memory that keeps copies of the currently active blocks. It works because of locality of reference.
5.1 Locality of Reference
- Temporal locality: an item accessed recently is likely to be accessed again soon (loop counters, repeated variables).
- Spatial locality: items near a recently accessed address are likely to be needed soon (arrays, sequential instructions).
- A cache exploits spatial locality by fetching a whole block of 4–64 words, and temporal locality by keeping that block after first use.
If the cache and memory are probed in parallel, the miss service time is alone and .
5.2 Design Issues
| Issue | Choices | Consequence |
|---|---|---|
| Block size | 4–64 words | Larger blocks exploit spatial locality but increase miss penalty |
| Mapping | Direct / associative / set-associative | Hardware cost vs conflict misses |
| Replacement | LRU / FIFO / random | Which line is evicted on a miss |
| Write policy | Write-through / write-back | Simplicity vs memory-traffic reduction |
| Write miss | Write-allocate / no-write-allocate | Whether the block is loaded on a write miss |
Examiner Tip: The 2-mark locality note must name both kinds and give one example each (loop variable and array traversal). For a 7-mark cache question add the EAT formula and a write-policy comparison.
After-Topic PYQ (
2023-24 Sec A Q1e— 2 Marks): Write a short note on locality of reference.
5.3 Cache Mapping Techniques
The address from the CPU is split into tag | index | word offset. The index chooses a line or set; the tag identifies which main-memory block is resident.
| Technique | Address fields | Placement rule | Strength | Weakness |
|---|---|---|---|---|
| Direct | tag / line index / offset | Block goes only to line | Cheapest, one tag compare | Conflict misses when two blocks map to same line |
| Fully associative | tag / offset | Block may go anywhere | Lowest conflict misses | Parallel comparison of all tags; expensive |
| Set-associative | tag / set index / offset | Block goes to set , any of its ways | Balanced | tag compares per access |
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart TD
A["CPU address"] --> B["word offset<br/>select word in block"]
A --> C["set/line index<br/>select cache location"]
A --> D["tag<br/>compare with stored tags"]
C --> E{"match?"}
D --> E
E -->|yes| F["HIT: read word"]
E -->|no| G["MISS: fetch block from M2<br/>evict by LRU/FIFO"]
Replacement policies: LRU evicts the least recently used way (best, needs access history); FIFO evicts the oldest-loaded (simple, can evict a hot line); random needs no history and avoids pathological FIFO behaviour.
After-Topic PYQ (
2025-26 Sec C Q5a— 7 Marks): Explain the following cache mapping techniques: (i) Direct Mapping (ii) Associative Mapping (iii) Set-Associative Mapping
6. Cache Mapping Numericals
6.1 Set-Associative Hierarchy — Worked
Here gives a 20-bit word address and an 8-word block gives the 3-bit offset. A block maps to set with tag .
Effective access time, : hierarchical probe → ; if M2 is probed in parallel → . State which convention is assumed.
6.2 Direct-Mapping Numerical — Worked
Main memory words → 16-bit address. Cache words with 4-word blocks ( offset bits) gives lines.
| Field | Bits | Reason |
|---|---|---|
| Tag | 6 | |
| Block / line index | 8 | |
| Word offset | 2 |
Examiner Tip: In every mapping numerical, write the three field widths before answering the sub-questions. Examiners award "address format" marks separately from "number of blocks" marks.
After-Topic PYQ (
2023-24 Sec C Q6a— 7 Marks): Consider a cache (M1) and memory (M2) hierarchy with following characteristics:\n- M1 : 16K word, 50 ns Access time\n- M2 : 1M word, 400 ns Access time\nAssume 8-word cache blocks and set size 256 words with set associative mapping.\n(i) Show and explain the mapping between M2 and M1.\n(ii) Calculate the effective memory access time with cache hit ratio = 0.95.
After-Topic PYQ (
2023-24 Sec C Q6b— 7 Marks): Explain the direct mapping technique. Consider a digital computer has a memory unit of and cache memory of 1k words. The cache uses direct mapping with 4 block size of four words.\n(i) How many bits are there in the tag, block and word fields of the address format?\n(ii) How many blocks can the cache accommodate?
7. Auxiliary Memories: Magnetic Disk, Tape and Optical Disks
7.1 Classification by Method of Access
| Access type | Meaning | Example |
|---|---|---|
| Random | Any location reached in constant time | RAM, ROM |
| Direct | Address given, then seek to neighbourhood; short sequential wait | Magnetic disk, SSD |
| Sequential | Items reached in fixed order from the beginning | Magnetic tape |
| Associative | Content compared in parallel | Cache / content-addressable memory |
7.2 Magnetic Disk Construction and Access Time
A disk has one or more rotating platters; each surface has concentric tracks, divided into sectors. Tracks at the same radius on all surfaces form a cylinder. A read/write head on an actuator arm moves radially to the selected track while the platter spins beneath it.
For a 7200 RPM disk, average rotational delay ms; a typical average seek is 5–10 ms.
7.3 Disk vs Tape vs Optical
| Medium | Access | Capacity | Speed | Volatile? | Strength / use |
|---|---|---|---|---|---|
| Magnetic disk | Direct/random | Hundreds GB–TB | ms | No | Primary secondary storage, OS and files |
| Magnetic tape | Sequential | TB per cartridge | seconds | No | Cheap archival backup |
| Optical disk (CD/DVD/Blu-ray) | Direct | 700 MB–50 GB+ | tens–hundreds ms | No | Distribution, WORM or rewritable archive |
Optical media use a laser: CD-ROM/DVD-ROM are read-only, CD-R is write-once (WORM), and CD-RW/DVD-RW use phase-change material for rewritability.
Examiner Tip: The disk question scores on the four access-time components and the formula. For the auxiliary-memory comparison, give one "characteristic" and one "function" per medium, not just a list of names.
After-Topic PYQ (
2024-25 Sec B Q2d— 7 Marks): Discuss the characteristics and functionalities of auxiliary memories such as magnetic disks, magnetic tapes, and optical disks?
After-Topic PYQ (
2023-24 Sec B Q2d— 7 Marks): Give classification of memory based on the method of access. Also discuss construction and working of magnetic disk and various components of disk access time.
8. Virtual Memory: Concept and Implementation
Virtual memory: a technique that gives each process a large, private address space by mapping virtual pages to physical frames in main memory, with the help of a page table and disk backing store.
8.1 Implementation Steps
- CPU generates a virtual address = virtual page number (VPN) + page offset.
- The TLB is searched first; on a TLB miss the page table is consulted.
- Page-table entry gives the physical frame number (PFN) plus valid/protection/dirty bits.
- Physical address = PFN + the same page offset.
- If the valid bit is 0 → page fault: OS loads the page from disk into a free frame, updates the table and restarts the instruction.
is the page-fault rate; because , even a small dominates performance.
| Concept | Meaning |
|---|---|
| Page | Fixed-size virtual block (e.g., 4 KB) |
| Frame | Equal-size physical block in RAM |
| Demand paging | Page loaded only when first referenced |
| Replacement | LRU/FIFO when no free frame exists |
| Working set | Pages actively needed by a process |
Examiner Tip: Virtual memory has no PYQ in this set, so any question on it is predicted. Write the VPN/offset → TLB → page table → PFN chain and the page-fault path; that is a complete 7-mark answer.
Solved Exam-Ready Questions
Solved Q1 (2025-26 Sec C Q5a — 7 Marks | Survival Mode)
Q: Explain the following cache mapping techniques: (i) Direct Mapping (ii) Associative Mapping (iii) Set-Associative Mapping
Solution:
- Common idea: a cache address is divided into tag, index and word offset; the tag tells which main-memory block is stored in the selected location.
- Direct mapping: with cache lines, block must occupy line (tag ). One tag comparison, cheapest hardware, but two frequently used blocks with the same index evict each other (conflict miss).
- Associative mapping: a block may occupy any line; all tags are compared in parallel. Lowest conflict misses, but comparators make it expensive and slow for large caches.
- Set-associative mapping: lines are grouped into sets of ways; block goes to set and may use any of its ways. It uses tag comparisons — a compromise.
- Address fields: direct = tag/line/word; fully associative = tag/word; set-associative = tag/set/word.
- Replacement: when the chosen location is full, LRU (or FIFO/random) selects the victim; a write-back cache must first write a dirty victim to main memory.
- Conclusion: direct is cheapest but most conflict-prone, fully associative is fastest in hit rate but costliest, and set-associative is the practical choice (commonly 2-, 4- or 8-way).
Solved Q2 (2024-25 Sec B Q2d — 7 Marks)
Q: Discuss the characteristics and functionalities of auxiliary memories such as magnetic disks, magnetic tapes, and optical disks?
Solution:
- Role: auxiliary (secondary) memory is non-volatile, large and cheap per bit; it holds programs and files when main memory loses power.
- Magnetic disk: platters, tracks, sectors and moving heads give direct access; used for OS, applications and user files; typical access is milliseconds.
- Magnetic tape: a sequential medium read from the beginning; very cheap per GB and ideal for backups and archival, but slow for random retrieval.
- Optical disk: laser reads pits/lands on CD, DVD or Blu-ray; ROM is read-only, R is write-once and RW is rewritable; good for software distribution and archives.
- Access time on disk: seek + rotational latency + transfer + controller overhead; seconds.
- Comparison table:
| Medium | Access | Speed | Capacity | Best use |
|---|---|---|---|---|
| Disk | Direct | ms | TB | Working storage |
| Tape | Sequential | s | TB cartridge | Backup |
| Optical | Direct | 100 ms | GB | Distribution/archive |
- Conclusion: disks balance speed and capacity for online data, tapes minimise backup cost, and optical media offer portable, durable distribution.
Solved Q3 (2023-24 Sec B Q2d — 7 Marks)
Q: Give classification of memory based on the method of access. Also discuss construction and working of magnetic disk and various components of disk access time.
Solution:
- Random access: any word reached directly in constant time — RAM, ROM.
- Sequential access: data reached in a fixed order — magnetic tape.
- Direct access: address the track/sector then wait for rotation — magnetic disk.
- Associative access: content compared in parallel — cache/CAM.
- Disk construction: rotating platters divided into tracks and sectors; a head on an actuator arm reads/writes the selected track; same-radius tracks form a cylinder.
- Working: CPU/controller sends a logical block address; the arm seeks to the cylinder, the platter rotates until the sector arrives under the head, then the data block is transferred through the controller buffer.
- Access-time formula: . Each term is a separate mark: seek, rotation, transfer, overhead.
Solved Q4 (2023-24 Sec C Q6a — 7 Marks | Numerical)
Q: Consider a cache (M1) and memory (M2) hierarchy with following characteristics:\n- M1 : 16K word, 50 ns Access time\n- M2 : 1M word, 400 ns Access time\nAssume 8-word cache blocks and set size 256 words with set associative mapping.\n(i) Show and explain the mapping between M2 and M1.\n(ii) Calculate the effective memory access time with cache hit ratio = 0.95.
Solution:
- Cache lines: lines.
- Associativity: set size words lines per set ways.
- Number of sets: sets.
- Address split: M2 has words → 20-bit address; offset bits; set index bits; tag bits. Format:
tag(11) | set(6) | word(3). - Mapping rule: block of M2 is placed in set ; within that set any of the 32 ways may hold it; stored tag . On access, the 6-bit set selects a row of 32 tags, compared in parallel with the 11-bit tag.
- EAT (hierarchical): .
- Alternative convention: if M2 is looked up in parallel with M1, the miss cost is 400 ns and EAT . State the assumption; the hierarchical value 70 ns is the usual answer.
Solved Q5 (2023-24 Sec C Q6b — 7 Marks | Numerical)
Q: Explain the direct mapping technique. Consider a digital computer has a memory unit of and cache memory of 1k words. The cache uses direct mapping with 4 block size of four words.\n(i) How many bits are there in the tag, block and word fields of the address format?\n(ii) How many blocks can the cache accommodate?
Solution:
- Direct mapping rule: block of main memory is stored only in cache line ; the tag stores .
- Main-memory address: words → 16-bit word address (word width 16 bits does not change the word-address bit count).
- Block/line count: cache words; block words → cache blocks.
- Word offset: bits select one of four words in the block.
- Block/index field: bits select the cache line.
- Tag field: bits.
- Address format:
tag(6) | block(8) | word(2); answer (i) 6/8/2 bits, (ii) 256 blocks.
Solved Q6 (2025-26 Sec C Q4b — 7 Marks)
Q: Explain the memory hierarchy with diagram. A memory chip has a capacity of . (i) Find the number of address lines required. (ii) How many such chips are needed to design a memory system?
Solution:
- Hierarchy: registers → cache (SRAM) → main memory (DRAM) → disk → tape/optical; speed and cost per bit fall as capacity rises.
- Why it works: temporal locality keeps hot items near the CPU; spatial locality brings whole blocks into the higher level.
- Address lines: the chip holds words, so address lines are needed to select one word.
- Word expansion: chips are needed to reach 256K words.
- Bit expansion: chips in parallel provide 16 data bits.
- Total: chips; four banks of two chips each, with bank selection using the two extra high-order address bits.
- Conclusion: the hierarchy gives near-cache speed with disk-like capacity; the chip calculation shows how word and bit expansion combine.
Solved Q7 (2025-26 Sec C Q5b — 7 Marks)
Q: Explain 2D and 2D memory organization. Write their advantages and disadvantages.
Solution:
- 2D: cells form a matrix; one row decoder selects one row and all bits leave through sense amplifiers.
- 2½D: the address is split into row and column parts; the row decoder activates a whole row but a column decoder/mux selects only the required -bit slice.
- Advantage of 2D: single decode step, fastest, simplest control.
- Disadvantage of 2D: needs sense amplifiers and very long rows for large memories, so it scales poorly.
- Advantage of 2½D: sense amplifiers are shared, reducing area and power; large arrays are practical.
- Disadvantage of 2½D: two decode steps add delay and the decoder/mux logic is more complex.
- Conclusion: 2D suits small fast memories (cache); 2½D suits large main memories.
Solved Q8 (2024-25 Sec C Q6a — 7 Marks)
Q: Design and explain the fundamental concept of computer memory hierarchy?
Solution:
- Fundamental idea: no single memory technology is simultaneously fastest, largest and cheapest; therefore several levels are combined.
- Design: place the smallest/fastest level closest to the CPU and progressively larger/slower/cheaper levels farther away.
- Levels: registers, cache (SRAM), main memory (DRAM), magnetic disk/SSD, tape/optical backup.
- Locality: temporal locality reuses recent words; spatial locality fetches neighbouring words into a block.
- Transfer unit: data moves between adjacent levels in blocks (cache lines, pages, file blocks).
- Performance: effective time ; a high hit ratio makes the average close to the fast level.
- Conclusion: the hierarchy hides the slowness of large storage while keeping cost per bit low — the central design concept of modern memory systems.
Solved Q9 (2024-25 Sec C Q6b — 7 Marks)
Q: Describe the architecture and operation of semiconductor RAM (Random Access Memory) memories such as DRAM (Dynamic RAM) and SRAM (Static RAM)?
Solution:
- SRAM cell: six transistors form a bistable latch; as long as power is applied, the stored bit is held without any refresh.
- SRAM operation: word line asserts, bit-line pair senses the latch state; write drivers overpower the latch to store a new value. Non-destructive read.
- DRAM cell: one transistor plus one capacitor (1T1C); charge on the capacitor represents the bit.
- DRAM operation: word line connects the capacitor to the bit line; a sense amplifier detects the small charge and restores it, so every read is a refresh-like operation.
- Refresh: all rows must be refreshed every 16–64 ms; refresh is internal and invisible to the CPU.
- Trade-off table:
| Parameter | SRAM | DRAM |
|---|---|---|
| Cell / density | 6T, low | 1T1C, high |
| Refresh | None | Required |
| Speed | Fast | Slower |
| Cost per bit | High | Low |
| Use | Cache | Main memory |
- Conclusion: SRAM buys speed with area, DRAM buys density with refresh overhead; modern machines use both in a hierarchy.
Solved Q10 (2-Mark Cluster — 2023-24 / 2024-25 / 2025-26 Sec A)
Q: Define D memory organization. / Explain the purpose of ROM memories in computer systems? / Write a short note on locality of reference.
Solution (short answers):
- 2½D: a memory organisation with both row and column decoding; a row is activated and a column multiplexer selects the desired word, reducing the number of sense amplifiers.
- ROM purpose: non-volatile read-mostly memory for boot firmware, microcode and fixed tables; it retains contents after power-off.
- Locality: temporal = recently used items are reused; spatial = neighbouring addresses are used next. Together they justify keeping blocks in a cache.
Practice Questions (Self-Test)
- (2 Marks) Define memory hierarchy and name its five levels from fastest to slowest.
- (2 Marks) What is the difference between random, direct and sequential access? Give one example of each.
- (7 Marks) A cache has 8K words, 16-word blocks and 4-way set associativity. Find the tag, set and word field widths if the main memory is 1M words.
- (7 Marks) For a cache with hit ratio 0.9, cache time 10 ns and memory time 200 ns, compute EAT under both hierarchical and parallel-probe conventions.
- (7 Marks) Compare write-through and write-back policies with a diagram and one traffic example.
- (7 Marks) Explain SRAM and DRAM cell operation and tabulate four differences.
- (7 Marks) Draw and explain 2D and 2½D organisations; state one advantage and one disadvantage each.
- (7 Marks) List PROM, EPROM, EEPROM and flash with their programming and erasure methods.
- (7 Marks) A disk rotates at 10,000 RPM with average seek 6 ms and transfers 4 KB at 100 MB/s. Compute its average access time.
- (7 Marks) Explain virtual address translation with VPN, page table, TLB and page fault, and write the EAT formula with page-fault rate.