Memory Hierarchy: Registers, Cache, RAM, ROM and Secondary Storage – Grade 12 A/L ICT Notes 2.4

© 2026 schoolict.net (Ruwan Mangala Suraweera)

2.4 Memory Hierarchy: Registers, Cache, RAM, ROM and Secondary Storageමතක ධුරාවලිය: රෙජිස්තර, කෑෂ්, RAM, ROM සහ ද්විතීයික ගබඩා

Grade 12 A/L ICT · Lesson 212 ශ්‍රේණිය A/L ICT · පාඩම 2

Prints all tabs in the language you are reading. Use “Save as PDF” in the print window to keep a copy.ඔබ කියවන භාෂාවෙන් සියලු tabs මුද්‍රණය වේ. පිටපතක් තියාගන්න print window එකේ “Save as PDF” තෝරන්න.
🎬Video coming soon in this language. Switch language to watch the other video.මේ භාෂාවෙන් වීඩියෝව ඉක්මනින් එනවා. අනෙක් වීඩියෝව බලන්න භාෂාව මාරු කරන්න.

In this videoමේ වීඩියෝවේ

  • No memory is fast, large and cheap at once, so a hierarchy is used.කිසිදු මතකයක් එකවර වේගවත්, විශාල සහ ලාභ නොවන නිසා ධුරාවලියක් භාවිත වේ.
  • Criteria: density, access method, access time, capacity, cost, volatility, location.නිර්ණායක: ඝනත්වය, ප්‍රවේශ ක්‍රමය, ප්‍රවේශ කාලය, ධාරිතාව, පිරිවැය, නශ්‍යතාව, ස්ථානය.
  • Volatile: registers, cache (SRAM), main memory (DRAM, SDRAM).නශ්‍ය: රෙජිස්තර, කෑෂ් (SRAM), ප්‍රධාන මතකය (DRAM, SDRAM).
  • Non-volatile: PROM (once), EPROM (UV erase), EEPROM (electrical erase), and secondary storage.අනශ්‍ය: PROM (එක් වරක්), EPROM (UV මැකීම), EEPROM (විදුලි මැකීම), සහ ද්විතීයික ගබඩා.
  • Going down: slower access, bigger capacity, lower cost per MB.පහළට යන විට: මන්දගාමී ප්‍රවේශය, විශාල ධාරිතාව, MB එකක අඩු පිරිවැය.
Memory hierarchyVolatile memoryNon-volatile memoryCache memorySRAMDRAMSDRAM

Notesසටහන්

Syllabus 2.4. No single memory is fast, big and cheap at the same time. So a computer uses a memory hierarchy: a small amount of very fast, costly memory near the CPU, and large amounts of slower, cheaper memory further away. In this part you learn why we need the hierarchy, the comparison criteria, volatile memory (registers, cache, RAM – SRAM, DRAM, SDRAM), non-volatile memory (PROM, EPROM, EEPROM and secondary storage), and how to compare them by access time, cost per MB and capacity.විෂය නිර්දේශය 2.4. එකවර වේගවත්, විශාල සහ ලාභ වූ තනි මතකයක් නැත. එබැවින් පරිගණකයක් මතක ධුරාවලියක් භාවිත කරයි: CPU අසල ඉතා වේගවත්, මිල අධික කුඩා මතක ප්‍රමාණයක්, සහ ඈතින් මන්දගාමී, ලාභ විශාල මතක ප්‍රමාණ. මෙම කොටසින් ධුරාවලිය අවශ්‍ය ඇයි, සංසන්දන නිර්ණායක, නශ්‍ය (volatile) මතකය (රෙජිස්තර, කෑෂ්, RAM – SRAM, DRAM, SDRAM), අනශ්‍ය (non-volatile) මතකය (PROM, EPROM, EEPROM සහ ද්විතීයික ගබඩා), සහ ප්‍රවේශ කාලය, MB එකක පිරිවැය සහ ධාරිතාව අනුව ඒවා සංසන්දනය කරන ආකාරය ඉගෙන ගනී.

1. The memory hierarchy1. මතක ධුරාවලිය

Registersරෙජිස්තරCache L1, L2, L3කෑෂ් මතකයMain memory (RAM)ප්‍රධාන මතකයSSD / hard diskSSD / දෘඪ තැටියOptical disc, tapeප්‍රකාශ තැටි, පටිFaster, costlier per byteBigger capacity
Top: fastest, smallest, most costly. Bottom: slowest, largest, cheapest.ඉහළ: වේගවත්ම, කුඩාම, මිල අධිකම. පහළ: මන්දගාමීම, විශාලම, ලාභම.

Think of a student’s books: the page you are reading is in your hand (registers), a few books are on the desk (cache), more are on the shelf in the room (RAM), and the rest are in the library (secondary storage). What you use most is kept closest.සිසුවෙකුගේ පොත් ගැන සිතන්න: ඔබ කියවන පිටුව ඔබේ අතේය (රෙජිස්තර), පොත් කිහිපයක් මේසය මතය (කෑෂ්), තවත් ඒවා කාමරයේ රාක්කයේය (RAM), ඉතිරිය පුස්තකාලයේය (ද්විතීයික ගබඩා). වැඩිපුරම භාවිත කරන දේ ළඟින්ම තබා ගනී.

  • Why needed: fast memory is very costly, so we cannot have gigabytes of it; cheap memory is slow. The hierarchy gives speed close to the fastest level at a cost close to the cheapest.අවශ්‍ය ඇයි: වේගවත් මතකය ඉතා මිල අධික නිසා ගිගාබයිට් ගණනක් තබා ගත නොහැක; ලාභ මතකය මන්දගාමීයි. ධුරාවලිය වේගවත්ම මට්ටමට ආසන්න වේගයක් ලාභම මට්ටමට ආසන්න පිරිවැයකින් ලබා දෙයි.
  • It works because programs mostly reuse the same data and nearby data (locality), so copies kept in fast memory are used again and again.ක්‍රමලේඛ බොහෝ විට එකම දත්ත සහ අසල දත්ත නැවත භාවිත කරන (ප්‍රාදේශිකත්වය) නිසා එය ක්‍රියා කරයි, එබැවින් වේගවත් මතකයේ ඇති පිටපත් නැවත නැවත භාවිත වේ.
  • We also need non-volatile storage so data is not lost when the power goes off.බලය විසන්ධි වූ විට දත්ත නැති නොවීමට අනශ්‍ය ගබඩාවක්ද අවශ්‍යයි.

2. Comparison criteria2. සංසන්දන නිර්ණායක

Criterionනිර්ණායකයMeaningඅර්ථය
Physical size / densityභෞතික ප්‍රමාණය / ඝනත්වයHow much data fits in a given space (bits per area)දී ඇති ඉඩකට ගැළපෙන දත්ත ප්‍රමාණය (වර්ගඵලයකට බිටු)
Access methodප්‍රවේශ ක්‍රමයRandom (RAM), direct (disk) or sequential (tape)අහඹු (RAM), සෘජු (තැටිය) හෝ අනුක්‍රමික (පටිය)
Access timeප්‍රවේශ කාලයDelay from asking for data to getting itදත්ත ඉල්ලීමේ සිට ලැබීම දක්වා ප්‍රමාදය
CapacityධාරිතාවHow much data it can holdතබා ගත හැකි දත්ත ප්‍රමාණය
CostපිරිවැයPrice per MB or GBMB හෝ GB එකක මිල
Volatilityනශ්‍යතාවIs data lost without power?බලය නැතිව දත්ත නැති වේද?
Locationස්ථානයInside the CPU, on the motherboard, or outsideCPU තුළ, මවු පුවරුවේ, හෝ පිටත
Physical arrangementභෞතික සැකැස්මHow bits are grouped into words (e.g. 8, 32 or 64 bits)බිටු වචනවලට කාණ්ඩ කරන ආකාරය (උදා. බිටු 8, 32 හෝ 64)

3. Volatile memory3. නශ්‍ය (volatile) මතකය

Volatile memory loses its contents when the power is switched off.නශ්‍ය මතකය බලය විසන්ධි කළ විට එහි අන්තර්ගතය නැති කරයි.

1
Registersරෙජිස්තර
Inside the CPU; fastest; hold only a few values being worked on now.CPU තුළ; වේගවත්ම; දැන් සකසන අගයන් කිහිපයක් පමණක් තබා ගනී.
2
Cache memoryකෑෂ් මතකය
Fast SRAM between CPU and RAM that keeps copies of often used data. L1 (smallest, fastest, in each core), L2 (larger), L3 (largest, shared by cores).නිතර භාවිත දත්තවල පිටපත් තබා ගන්නා CPU සහ RAM අතර වේගවත් SRAM. L1 (කුඩාම, වේගවත්ම, එක් එක් හරයේ), L2 (විශාල), L3 (විශාලම, හර විසින් බෙදා ගනී).
3
Main memory (RAM)ප්‍රධාන මතකය (RAM)
Holds the running programs and their data; random access; read and write.ධාවනය වන ක්‍රමලේඛ සහ ඒවායේ දත්ත තබා ගනී; අහඹු ප්‍රවේශය; කියවීම සහ ලිවීම.
Type of RAMRAM වර්ගයHow it stores a bitබිටුවක් ගබඩා කරන ආකාරයFeaturesලක්ෂණUsed forභාවිතය
SRAM (static)SRAM (ස්ථිතික)Flip-flop of about 6 transistorsට්‍රාන්සිස්ටර 6 ක පමණ flip-flopVery fast, no refresh, costly, low densityඉතා වේගවත්, refresh නැත, මිල අධික, අඩු ඝනත්වයCache memoryකෑෂ් මතකය
DRAM (dynamic)DRAM (ගතික)Tiny capacitor + 1 transistorකුඩා ධාරිත්‍රකයක් + ට්‍රාන්සිස්ටර 1Needs refreshing thousands of times a second; cheaper, high density, slowerතත්පරයට දහස් වාරයක් refresh අවශ්‍යයි; ලාභ, ඉහළ ඝනත්වය, මන්දගාමීMain memoryප්‍රධාන මතකය
SDRAM (synchronous DRAM)SDRAM (සමකාලී DRAM)DRAM that works in step with the system clockපද්ධති ඔරලෝසුව සමඟ පියවරෙන් පියවර ක්‍රියා කරන DRAMFaster than plain DRAM; DDR, DDR4, DDR5 are types of SDRAMසාමාන්‍ය DRAM ට වඩා වේගවත්; DDR, DDR4, DDR5 SDRAM වර්ග වේModern PC RAMනවීන PC RAM

4. Non-volatile memory4. අනශ්‍ය (non-volatile) මතකය

Non-volatile memory keeps its contents without power. ROM holds the start-up program (BIOS/UEFI firmware).අනශ්‍ය මතකය බලය නැතිව එහි අන්තර්ගතය තබා ගනී. ROM ආරම්භක ක්‍රමලේඛය (BIOS/UEFI ස්ථිරාංග) තබා ගනී.

Typeවර්ගයHow it is writtenලියන ආකාරයCan it be erased?මැකිය හැකිද?
ROM (mask ROM)ROM (mask ROM)Written at the factoryකර්මාන්තශාලාවේදී ලියනු ලැබේNoනැත
PROMPROMBlank; programmed once by the user with a special deviceහිස්; විශේෂ උපාංගයකින් පරිශීලකයා එක් වරක් ක්‍රමලේඛනය කරයිNo – one time onlyනැත – එක් වරක් පමණි
EPROMEPROMProgrammed electricallyවිදුලියෙන් ක්‍රමලේඛනය කෙරේYes – whole chip erased by ultraviolet light through a quartz window, then reprogrammedඔව් – ක්වාට්ස් කවුළුවක් හරහා පාරජම්බුල කිරණ මගින් මුළු චිපයම මකා නැවත ක්‍රමලේඛනය
EEPROMEEPROMProgrammed electrically inside the computerපරිගණකය තුළම විදුලියෙන් ක්‍රමලේඛනයYes – electrically, byte by byte, without removing it; flash memory is a fast block-erase typeඔව් – ඉවත් නොකර බයිට් අනුව විදුලියෙන්; ෆ්ලෑෂ් මතකය වේගවත් block-erase වර්ගයකි

Secondary storage is non-volatile and large: magnetic (hard disk, tape), optical (CD, DVD, Blu-ray) and flash (SSD, memory cards, pen drives). It is not directly used by the CPU – data is first copied into RAM.ද්විතීයික ගබඩාව අනශ්‍ය සහ විශාලයි: චුම්බක (දෘඪ තැටිය, පටිය), ප්‍රකාශ (CD, DVD, Blu-ray) සහ ෆ්ලෑෂ් (SSD, මතක කාඩ්පත්, පෑන් ධාවක). CPU එය සෘජුව භාවිත නොකරයි – දත්ත පළමුව RAM වෙත පිටපත් වේ.

Volatileනශ්‍යRegistersරෙජිස්තරCacheකෑෂ් මතකයRAM: SRAM, DRAM, SDRAMRAM: SRAM, DRAM, SDRAMNon-volatile ROMඅනශ්‍ය ROMPROMPROMEPROMEPROMEEPROM, flashEEPROM, ෆ්ලෑෂ්Secondary storageද්විතීයික ගබඩාMagneticචුම්බකOpticalප්‍රකාශFlashෆ්ලෑෂ්
Volatile and non-volatile memory types.නශ්‍ය සහ අනශ්‍ය මතක වර්ග.

5. Comparing the levels5. මට්ටම් සංසන්දනය

MemoryමතකයTypical access timeසාමාන්‍ය ප්‍රවේශ කාලයTypical capacityසාමාන්‍ය ධාරිතාවCost per MBMB එකක පිරිවැය
Registersරෙජිස්තර< 1 ns< 1 nsBytes (a few hundred)Bytes (a few hundred)Highestඉහළම
Cache (L1, L2, L3)කෑෂ් මතකය (L1, L2, L3)1–20 ns1–20 nsKB to tens of MBKB to tens of MBVery highඉතා ඉහළ
Main memory (RAM)ප්‍රධාන මතකය (RAM)50–100 ns50–100 ns4–64 GB4–64 GBMediumමධ්‍යම
SSD (flash)SSD (ෆ්ලෑෂ්)about 0.1 msපමණ 0.1 ms256 GB – 4 TB256 GB – 4 TBLowඅඩු
Hard disk (HDD)දෘඪ තැටිය (HDD)about 10 msපමණ 10 ms1–20 TB1–20 TBVery lowඉතා අඩු
Optical disc / tapeප්‍රකාශ තැටි / පටි100 ms to minutes100 ms සිට මිනිත්තු දක්වාGB (disc) to TB (tape)GB (disc) to TB (tape)Lowestඅඩුම
🧮 Worked exampleවිසඳූ උදාහරණය A CPU finds data in cache 95% of the time (2 ns). Otherwise it reads RAM (80 ns). Using the simple model, what is the average access time?CPU එකක් 95% ක් වාරවලදී කෑෂ් එකේ දත්ත සොයා ගනී (ns 2). එසේ නොමැති විට RAM කියවයි (ns 80). සරල ආකෘතිය භාවිතයෙන් සාමාන්‍ය ප්‍රවේශ කාලය කුමක්ද?
Average = 0.95 × 2 + 0.05 × 80 = 1.9 + 4.0 = 5.9 ns. Much closer to cache speed than RAM speed – that is why cache helps.සාමාන්‍යය = 0.95 × 2 + 0.05 × 80 = 1.9 + 4.0 = ns 5.9. RAM වේගයට වඩා කෑෂ් වේගයට බොහෝ ආසන්නයි – කෑෂ් උපකාරී වන්නේ එබැවිනි.
🧮 Worked exampleවිසඳූ උදාහරණය A hard disk access takes 10 ms and RAM takes 50 ns. How many times slower is the hard disk?දෘඪ තැටි ප්‍රවේශයකට ms 10 ක් සහ RAM සඳහා ns 50 ක් ගතවේ. දෘඪ තැටිය කී ගුණයකින් මන්දගාමීද?
10 ms = 10,000,000 ns. 10,000,000 ÷ 50 = 200,000 times slower.ms 10 = ns 10,000,000. 10,000,000 ÷ 50 = 200,000 ගුණයකින් මන්දගාමී.
🧮 Worked exampleවිසඳූ උදාහරණය A computer has 8 GB of byte-addressable RAM. How many bytes is that, and how many address lines are needed? How many 64-bit words does it hold?පරිගණකයක බයිට්-ලිපිනගත RAM GB 8 ක් ඇත. එය බයිට් කීයද, ලිපින රේඛා කීයක් අවශ්‍යද? බිටු 64 වචන කීයක් එහි තබා ගත හැකිද?
8 GB = 8 × 2³⁰ = 2³³ = 8,589,934,592 bytes, so 33 address lines. One 64-bit word = 8 bytes, so 8,589,934,592 ÷ 8 = 1,073,741,824 words.GB 8 = 8 × 2³⁰ = 2³³ = බයිට් 8,589,934,592, එබැවින් ලිපින රේඛා 33. බිටු 64 වචනයක් = බයිට් 8, එබැවින් 8,589,934,592 ÷ 8 = වචන 1,073,741,824.
💡 Memory units here use powers of 2: 1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB = 2³⁰ bytes.මෙහි මතක ඒකක 2 හි බල භාවිත කරයි: 1 KB = බයිට් 1024, 1 MB = KB 1024, 1 GB = MB 1024 = බයිට් 2³⁰.
🚀 Beyond the syllabus (2026 update)🚀 විෂය නිර්දේශයෙන් ඔබ්බට (2026 යාවත්කාලීනය) Not required for the exam – read for interest.විභාගයට අවශ්‍ය නැත – දැනුම සඳහා කියවන්න. DDR5, HBM and PCIe 5.0 SSDs. In 2026 new PCs use DDR5 SDRAM (about 4,800–8,000 MT/s), and phones use LPDDR5X. AI graphics chips stack DRAM layers on top of each other as HBM3E (high bandwidth memory) to feed thousands of cores. PCIe 5.0 NVMe SSDs read at about 14,000 MB/s, closing part of the gap between RAM and storage. New non-volatile ideas such as MRAM are being tested.DDR5, HBM සහ PCIe 5.0 SSD. 2026 දී නව PC DDR5 SDRAM (MT/s 4,800–8,000 පමණ) භාවිත කරන අතර දුරකථන LPDDR5X භාවිත කරයි. AI ග්‍රැෆික් චිප හර දහස් ගණනකට දත්ත සැපයීමට DRAM ස්ථර එකක් මත එකක් HBM3E (ඉහළ කලාප පළල මතකය) ලෙස තබයි. PCIe 5.0 NVMe SSD තත්පරයට MB 14,000 පමණ කියවන අතර RAM සහ ගබඩාව අතර පරතරයේ කොටසක් අඩු කරයි. MRAM වැනි නව අනශ්‍ය අදහස් පරීක්ෂා වෙමින් පවතී.

Key Wordsප්‍රධාන පද

Memory hierarchyමතක ධුරාවලිය
Arranging memory from small, fast and costly to large, slow and cheap.කුඩා, වේගවත් සහ මිල අධික සිට විශාල, මන්දගාමී සහ ලාභ දක්වා මතකය සැකසීම.
Volatile memoryනශ්‍ය මතකය
Memory that loses its contents when power is off.බලය නැති විට අන්තර්ගතය නැති කරන මතකය.
Non-volatile memoryඅනශ්‍ය මතකය
Memory that keeps its contents without power.බලය නැතිව අන්තර්ගතය තබා ගන්නා මතකය.
Cache memoryකෑෂ් මතකය
Small fast SRAM between the CPU and RAM holding often used data.නිතර භාවිත දත්ත තබා ගන්නා CPU සහ RAM අතර කුඩා වේගවත් SRAM.
SRAMSRAM
Static RAM made of flip-flops; fast and needs no refresh.flip-flop වලින් සෑදූ ස්ථිතික RAM; වේගවත් සහ refresh අවශ්‍ය නැත.
DRAMDRAM
Dynamic RAM made of capacitors; must be refreshed.ධාරිත්‍රකවලින් සෑදූ ගතික RAM; refresh කළ යුතුය.
SDRAMSDRAM
DRAM synchronised with the system clock, e.g. DDR5.පද්ධති ඔරලෝසුව සමඟ සමකාලී DRAM, උදා. DDR5.
PROMPROM
ROM that the user can program only once.පරිශීලකයාට එක් වරක් පමණක් ක්‍රමලේඛනය කළ හැකි ROM.
EPROMEPROM
ROM erased with ultraviolet light and reprogrammed.පාරජම්බුල කිරණවලින් මකා නැවත ක්‍රමලේඛනය කරන ROM.
EEPROMEEPROM
ROM erased and rewritten electrically inside the circuit.පරිපථය තුළම විදුලියෙන් මකා නැවත ලියන ROM.
Access timeප්‍රවේශ කාලය
The delay between asking for data and receiving it.දත්ත ඉල්ලීම සහ ලැබීම අතර ප්‍රමාදය.
Random accessඅහඹු ප්‍රවේශය
Any location can be reached in the same time.ඕනෑම ස්ථානයකට එකම කාලයකින් ළඟා විය හැක.
Secondary storageද්විතීයික ගබඩාව
Large non-volatile storage such as disks and flash drives.තැටි සහ ෆ්ලෑෂ් ධාවක වැනි විශාල අනශ්‍ය ගබඩාව.
Wordවචනය
A group of bits handled together by the CPU, e.g. 64 bits.CPU විසින් එකට හසුරුවන බිටු කාණ්ඩයක්, උදා. බිටු 64.
RefreshRefresh කිරීම
Recharging DRAM cells regularly so data is not lost.දත්ත නැති නොවීමට DRAM සෛල නිතිපතා නැවත ආරෝපණය කිරීම.

Sample Q&Aආදර්ශ ප්‍රශ්න සහ පිළිතුරු

1Why does a computer need a memory hierarchy?පරිගණකයකට මතක ධුරාවලියක් අවශ්‍ය ඇයි?

Answerපිළිතුර: Fast memory is very costly and small, cheap memory is slow. Mixing levels gives speed near the fastest level at a cost near the cheapest, and non-volatile levels keep data without power.වේගවත් මතකය ඉතා මිල අධික සහ කුඩායි, ලාභ මතකය මන්දගාමීයි. මට්ටම් මිශ්‍ර කිරීම වේගවත්ම මට්ටමට ආසන්න වේගයක් ලාභම මට්ටමට ආසන්න පිරිවැයකින් ලබා දෙන අතර අනශ්‍ය මට්ටම් බලය නැතිව දත්ත තබා ගනී.

2Distinguish volatile and non-volatile memory with two examples each.උදාහරණ දෙක බැගින් නශ්‍ය සහ අනශ්‍ය මතකය වෙන්කර දක්වන්න.

Answerපිළිතුර: Volatile memory loses data without power (registers, cache, RAM). Non-volatile keeps data (ROM, EEPROM, hard disk, SSD).නශ්‍ය මතකය බලය නැතිව දත්ත නැති කරයි (රෙජිස්තර, කෑෂ්, RAM). අනශ්‍ය දත්ත තබා ගනී (ROM, EEPROM, දෘඪ තැටිය, SSD).

3Compare SRAM and DRAM.SRAM සහ DRAM සංසන්දනය කරන්න.

Answerපිළිතුර: SRAM uses flip-flops, needs no refresh, is fast and costly and is used for cache. DRAM uses capacitors, needs refreshing, is slower, cheaper and denser and is used for main memory.SRAM flip-flop භාවිත කරයි, refresh අවශ්‍ය නැත, වේගවත් සහ මිල අධික වන අතර කෑෂ් සඳහා භාවිත වේ. DRAM ධාරිත්‍රක භාවිත කරයි, refresh අවශ්‍යයි, මන්දගාමී, ලාභ සහ ඝන වන අතර ප්‍රධාන මතකයට භාවිත වේ.

4How do PROM, EPROM and EEPROM differ?PROM, EPROM සහ EEPROM වෙනස් වන්නේ කෙසේද?

Answerපිළිතුර: PROM can be programmed once only. EPROM is erased with ultraviolet light and reprogrammed. EEPROM is erased and rewritten electrically without removing it.PROM එක් වරක් පමණක් ක්‍රමලේඛනය කළ හැක. EPROM පාරජම්බුල කිරණවලින් මකා නැවත ක්‍රමලේඛනය කෙරේ. EEPROM ඉවත් නොකර විදුලියෙන් මකා නැවත ලියනු ලැබේ.

5What is cache memory and why are there L1, L2 and L3 levels?කෑෂ් මතකය යනු කුමක්ද සහ L1, L2 සහ L3 මට්ටම් ඇත්තේ ඇයි?

Answerපිළිතුර: Cache is fast SRAM that keeps copies of often used data near the CPU. L1 is smallest and fastest, L3 is larger and shared, so each level is a balance of speed and size.කෑෂ් යනු නිතර භාවිත දත්තවල පිටපත් CPU අසල තබා ගන්නා වේගවත් SRAM ය. L1 කුඩාම සහ වේගවත්ම, L3 විශාල සහ බෙදාගත් එකකි, එබැවින් සෑම මට්ටමක්ම වේගය සහ ප්‍රමාණය අතර සමතුලිතතාවකි.

6List the levels from fastest to slowest.වේගවත්ම සිට මන්දගාමීම දක්වා මට්ටම් ලැයිස්තුගත කරන්න.

Answerපිළිතුර: Registers, cache, main memory (RAM), SSD, hard disk, optical disc and tape.රෙජිස්තර, කෑෂ්, ප්‍රධාන මතකය (RAM), SSD, දෘඪ තැටිය, ප්‍රකාශ තැටි සහ පටිය.

MCQබහුවරණ ප්‍රශ්න

Choose the correct answer for each question.සෑම ප්‍රශ්නයකටම නිවැරදි පිළිතුර තෝරන්න.

Scoreලකුණු: 0 / 20

1Which memory is the fastest?වේගවත්ම මතකය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Inside the CPU.CPU තුළ.

2Which is volatile?නශ්‍ය වන්නේ කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Loses data without power.බලය නැතිව දත්ත නැති වේ.

3Cache memory is usually made of:කෑෂ් මතකය සාමාන්‍යයෙන් සාදා ඇත්තේ:

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

Fast, no refresh.වේගවත්, refresh නැත.

4Which memory must be refreshed regularly?නිතිපතා refresh කළ යුතු මතකය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

Capacitors leak charge.ධාරිත්‍රකවල ආරෝපණය කාන්දු වේ.

5EPROM is erased using:EPROM මකා දමන්නේ:

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Quartz window.ක්වාට්ස් කවුළුව.

6ROM that can be programmed only once by the user is:පරිශීලකයාට එක් වරක් පමණක් ක්‍රමලේඛනය කළ හැකි ROM:

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Programmable ROM.ක්‍රමලේඛනය කළ හැකි ROM.

7Moving down the hierarchy, which INCREASES?ධුරාවලියේ පහළට යන විට වැඩි වන්නේ කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Bigger and cheaper.විශාල සහ ලාභ.

8With 95% cache hits at 2 ns and misses at 80 ns, the average access time (simple model) is:95% කෑෂ් සාර්ථකත්වය ns 2 සහ අසාර්ථක ns 80 සමඟ සාමාන්‍ය ප්‍රවේශ කාලය (සරල ආකෘතිය):

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

1.9 + 4 = 5.9.1.9 + 4 = 5.9.

9DDR5 is a type of:DDR5 යනු කුමන වර්ගයක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

Synchronous DRAM.සමකාලී DRAM.

10How many address lines are needed for 8 GB of byte-addressable memory?බයිට්-ලිපිනගත GB 8 මතකයකට ලිපින රේඛා කීයක් අවශ්‍යද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

2³³ bytes.බයිට් 2³³.

11A hard disk (10 ms) compared with RAM (50 ns) is about:RAM (ns 50) හා සසඳන විට දෘඪ තැටිය (ms 10) පමණ:

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

10,000,000 ÷ 50.10,000,000 ÷ 50.

12The BIOS/UEFI start-up program is stored in:BIOS/UEFI ආරම්භක ක්‍රමලේඛය ගබඩා වන්නේ:

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Must survive power off.බලය නැති විට රැඳී සිටිය යුතුය.

13Which term means: “Arranging memory from small, fast and costly to large, slow and cheap”?“කුඩා, වේගවත් සහ මිල අධික සිට විශාල, මන්දගාමී සහ ලාභ දක්වා මතකය සැකසීම” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

Memory hierarchy – Arranging memory from small, fast and costly to large, slow and cheap.මතක ධුරාවලිය – කුඩා, වේගවත් සහ මිල අධික සිට විශාල, මන්දගාමී සහ ලාභ දක්වා මතකය සැකසීම.

14Which term means: “Memory that loses its contents when power is off”?“බලය නැති විට අන්තර්ගතය නැති කරන මතකය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Volatile memory – Memory that loses its contents when power is off.නශ්‍ය මතකය – බලය නැති විට අන්තර්ගතය නැති කරන මතකය.

15Which term means: “Memory that keeps its contents without power”?“බලය නැතිව අන්තර්ගතය තබා ගන්නා මතකය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Non-volatile memory – Memory that keeps its contents without power.අනශ්‍ය මතකය – බලය නැතිව අන්තර්ගතය තබා ගන්නා මතකය.

16Which term means: “Small fast SRAM between the CPU and RAM holding often used data”?“නිතර භාවිත දත්ත තබා ගන්නා CPU සහ RAM අතර කුඩා වේගවත් SRAM” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Cache memory – Small fast SRAM between the CPU and RAM holding often used data.කෑෂ් මතකය – නිතර භාවිත දත්ත තබා ගන්නා CPU සහ RAM අතර කුඩා වේගවත් SRAM.

17Which term means: “Static RAM made of flip-flops; fast and needs no refresh”?“flip-flop වලින් සෑදූ ස්ථිතික RAM; වේගවත් සහ refresh අවශ්‍ය නැත” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

SRAM – Static RAM made of flip-flops; fast and needs no refresh.SRAM – flip-flop වලින් සෑදූ ස්ථිතික RAM; වේගවත් සහ refresh අවශ්‍ය නැත.

18Which term means: “Dynamic RAM made of capacitors; must be refreshed”?“ධාරිත්‍රකවලින් සෑදූ ගතික RAM; refresh කළ යුතුය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

DRAM – Dynamic RAM made of capacitors; must be refreshed.DRAM – ධාරිත්‍රකවලින් සෑදූ ගතික RAM; refresh කළ යුතුය.

19Which term means: “DRAM synchronised with the system clock, e.g. DDR5”?“පද්ධති ඔරලෝසුව සමඟ සමකාලී DRAM, උදා. DDR5” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

SDRAM – DRAM synchronised with the system clock, e.g. DDR5.SDRAM – පද්ධති ඔරලෝසුව සමඟ සමකාලී DRAM, උදා. DDR5.

20Which term means: “ROM that the user can program only once”?“පරිශීලකයාට එක් වරක් පමණක් ක්‍රමලේඛනය කළ හැකි ROM” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

PROM – ROM that the user can program only once.PROM – පරිශීලකයාට එක් වරක් පමණක් ක්‍රමලේඛනය කළ හැකි ROM.

MCQ answer keyMCQ පිළිතුරු

  1. C – Inside the CPU.CPU තුළ.
  2. A – Loses data without power.බලය නැතිව දත්ත නැති වේ.
  3. E – Fast, no refresh.වේගවත්, refresh නැත.
  4. B – Capacitors leak charge.ධාරිත්‍රකවල ආරෝපණය කාන්දු වේ.
  5. C – Quartz window.ක්වාට්ස් කවුළුව.
  6. D – Programmable ROM.ක්‍රමලේඛනය කළ හැකි ROM.
  7. D – Bigger and cheaper.විශාල සහ ලාභ.
  8. B – 1.9 + 4 = 5.9.1.9 + 4 = 5.9.
  9. E – Synchronous DRAM.සමකාලී DRAM.
  10. A – 2³³ bytes.බයිට් 2³³.
  11. B – 10,000,000 ÷ 50.10,000,000 ÷ 50.
  12. C – Must survive power off.බලය නැති විට රැඳී සිටිය යුතුය.
  13. E – Memory hierarchy – Arranging memory from small, fast and costly to large, slow and cheap.මතක ධුරාවලිය – කුඩා, වේගවත් සහ මිල අධික සිට විශාල, මන්දගාමී සහ ලාභ දක්වා මතකය සැකසීම.
  14. A – Volatile memory – Memory that loses its contents when power is off.නශ්‍ය මතකය – බලය නැති විට අන්තර්ගතය නැති කරන මතකය.
  15. D – Non-volatile memory – Memory that keeps its contents without power.අනශ්‍ය මතකය – බලය නැතිව අන්තර්ගතය තබා ගන්නා මතකය.
  16. D – Cache memory – Small fast SRAM between the CPU and RAM holding often used data.කෑෂ් මතකය – නිතර භාවිත දත්ත තබා ගන්නා CPU සහ RAM අතර කුඩා වේගවත් SRAM.
  17. E – SRAM – Static RAM made of flip-flops; fast and needs no refresh.SRAM – flip-flop වලින් සෑදූ ස්ථිතික RAM; වේගවත් සහ refresh අවශ්‍ය නැත.
  18. B – DRAM – Dynamic RAM made of capacitors; must be refreshed.DRAM – ධාරිත්‍රකවලින් සෑදූ ගතික RAM; refresh කළ යුතුය.
  19. C – SDRAM – DRAM synchronised with the system clock, e.g. DDR5.SDRAM – පද්ධති ඔරලෝසුව සමඟ සමකාලී DRAM, උදා. DDR5.
  20. A – PROM – ROM that the user can program only once.PROM – පරිශීලකයාට එක් වරක් පමණක් ක්‍රමලේඛනය කළ හැකි ROM.

Structured Questionsව්‍යුහගත ප්‍රශ්න

1(a) Draw the memory hierarchy pyramid. (b) State how speed, capacity and cost change from top to bottom.(a) මතක ධුරාවලි පිරමීඩය අඳින්න. (b) ඉහළ සිට පහළට වේගය, ධාරිතාව සහ පිරිවැය වෙනස් වන ආකාරය සඳහන් කරන්න. (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
(a) Registers, cache, RAM, secondary storage (SSD/HDD), off-line (optical/tape) in order; (b) speed falls; capacity rises; cost per MB falls.(a) රෙජිස්තර, කෑෂ්, RAM, ද්විතීයික ගබඩා (SSD/HDD), off-line (ප්‍රකාශ/පටි) පිළිවෙළින්; (b) වේගය අඩු වේ; ධාරිතාව වැඩි වේ; MB එකක පිරිවැය අඩු වේ.

2Classify as volatile or non-volatile: SRAM, EEPROM, DRAM, PROM, hard disk, registers.නශ්‍ය හෝ අනශ්‍ය ලෙස වර්ග කරන්න: SRAM, EEPROM, DRAM, PROM, දෘඪ තැටිය, රෙජිස්තර. (2 marksලකුණු 2)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
Volatile: SRAM, DRAM, registers; non-volatile: EEPROM, PROM, hard disk.නශ්‍ය: SRAM, DRAM, රෙජිස්තර; අනශ්‍ය: EEPROM, PROM, දෘඪ තැටිය.

3Compare SRAM and DRAM under: (a) how a bit is stored (b) refresh (c) speed and cost (d) use.SRAM සහ DRAM සංසන්දනය කරන්න: (a) බිටුවක් ගබඩා කරන ආකාරය (b) refresh (c) වේගය සහ පිරිවැය (d) භාවිතය. (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
(a) SRAM flip-flop, DRAM capacitor; (b) SRAM none, DRAM needs refresh; (c) SRAM faster and costlier; (d) SRAM cache, DRAM main memory.(a) SRAM flip-flop, DRAM ධාරිත්‍රකය; (b) SRAM නැත, DRAM refresh අවශ්‍යයි; (c) SRAM වේගවත් සහ මිල අධික; (d) SRAM කෑෂ්, DRAM ප්‍රධාන මතකය.

4Cache hits 95% of the time at 2 ns; misses read RAM at 80 ns. (a) Find the average access time. (b) Why does cache improve performance?කෑෂ් 95% ක් වාරවල ns 2 කින් සාර්ථකයි; අසාර්ථක වූ විට RAM ns 80 කින් කියවයි. (a) සාමාන්‍ය ප්‍රවේශ කාලය සොයන්න. (b) කෑෂ් කාර්ය සාධනය වැඩි කරන්නේ ඇයි? (3 marksලකුණු 3)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
(a) 0.95 × 2 + 0.05 × 80 = 5.9 ns; (b) most data is found in fast cache because programs reuse nearby data; the CPU waits less for RAM.(a) 0.95 × 2 + 0.05 × 80 = ns 5.9; (b) ක්‍රමලේඛ අසල දත්ත නැවත භාවිත කරන නිසා බොහෝ දත්ත වේගවත් කෑෂ් එකේ හමු වේ; CPU එක RAM සඳහා අඩුවෙන් රැඳී සිටී.

5Explain PROM, EPROM and EEPROM and give a use of EEPROM or flash.PROM, EPROM සහ EEPROM පැහැදිලි කර EEPROM හෝ ෆ්ලෑෂ් සඳහා භාවිතයක් දෙන්න. (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
PROM programmed once; EPROM erased by ultraviolet light; EEPROM erased electrically in the circuit; use: BIOS/UEFI firmware updates or pen drives.PROM එක් වරක් ක්‍රමලේඛනය; EPROM පාරජම්බුල කිරණවලින් මකයි; EEPROM පරිපථය තුළ විදුලියෙන් මකයි; භාවිතය: BIOS/UEFI ස්ථිරාංග යාවත්කාලීන හෝ පෑන් ධාවක.

🎮 Game🎮 ක්‍රීඩා

Pick a game. Each one uses words from this lesson.ක්‍රීඩාවක් තෝරන්න. හැම එකක්ම මේ පාඩමේ වචන පාවිච්චි කරනවා.

Summary & Downloadsසාරාංශය සහ බාගත කිරීම්

Key pointsප්‍රධාන කරුණු

  • No memory is fast, large and cheap at once, so a hierarchy is used.කිසිදු මතකයක් එකවර වේගවත්, විශාල සහ ලාභ නොවන නිසා ධුරාවලියක් භාවිත වේ.
  • Criteria: density, access method, access time, capacity, cost, volatility, location.නිර්ණායක: ඝනත්වය, ප්‍රවේශ ක්‍රමය, ප්‍රවේශ කාලය, ධාරිතාව, පිරිවැය, නශ්‍යතාව, ස්ථානය.
  • Volatile: registers, cache (SRAM), main memory (DRAM, SDRAM).නශ්‍ය: රෙජිස්තර, කෑෂ් (SRAM), ප්‍රධාන මතකය (DRAM, SDRAM).
  • Non-volatile: PROM (once), EPROM (UV erase), EEPROM (electrical erase), and secondary storage.අනශ්‍ය: PROM (එක් වරක්), EPROM (UV මැකීම), EEPROM (විදුලි මැකීම), සහ ද්විතීයික ගබඩා.
  • Going down: slower access, bigger capacity, lower cost per MB.පහළට යන විට: මන්දගාමී ප්‍රවේශය, විශාල ධාරිතාව, MB එකක අඩු පිරිවැය.
  • Secondary storage is magnetic, optical or flash and is copied to RAM before use.ද්විතීයික ගබඩාව චුම්බක, ප්‍රකාශ හෝ ෆ්ලෑෂ් වන අතර භාවිතයට පෙර RAM වෙත පිටපත් වේ.

Downloadsබාගත කිරීම්

Full Lesson 2 PDFසම්පූර්ණ පාඩම 2 PDF: English · සිංහල

Next: Lesson 2 A/L Exam Practiceඊළඟට: පාඩම 2 A/L විභාග පුහුණුව →

© 2026 schoolict.net (Ruwan Mangala Suraweera). All rights reserved.සියලු හිමිකම් ඇවිරිණි.