Memory

i) Define memory seek time and latency time.

  • Memory Access Time: The total time required to read or write data from a memory location after an address is sent to the memory unit. It is the time between the moment the CPU requests data and the moment that data becomes available on the data bus.

  • Memory Latency: The delay between a request for data and the start of data transfer from memory. It is the time gap between when the CPU asks for data and when the first bit of that data starts to arrive.

Compare and contrast the different types of RAM in terms of their structure, performance, and applications.

What do you understand by Hit and miss ratio in cache memory?

ii) Discuss read hit, write hit, read miss and write miss in cache memory. (6 Marks)

  • Read Hit: The CPU issues a read request, finds the data word present in the cache, and reads it instantly at high speed without accessing main memory.

  • Read Miss: The CPU requests data not in the cache. A block of words containing the requested data is transferred from the main memory to the cache, incurring a Miss Penalty delay.

  • Write Hit: The CPU attempts to update data that already exists inside the cache. The choice of updating memory depends on two core Write Policies:

    1. Write-Through: Data is written to both the cache block and main memory simultaneously to maintain instant consistency.

    2. Write-Back: Data is written only to the cache block initially and marked as modified. It is written to main memory later when that block is replaced.

  • Write Miss: The CPU attempts to write data to a location currently missing from the cache. The data must be updated directly in the main memory, or the missing block is brought into the cache to be modified.


iii) How can virtual memory improve system efficiency, and what are its limitations? (5 Marks)

  • Efficiency Improvements:

    1. Allows large programs to run even if they cannot fit entirely inside the physical RAM capacity.

    2. Provides memory isolation and protection between active system processes.

    3. Enables efficient, optimized use of physical RAM slots.

    4. Supports safe multitasking environments without risk of sudden memory overflow crash.

  • Limitations:

    1. Page Fault Overheads: If the CPU tries to access a page not currently sitting in the RAM, a page fault occurs, causing a slow disk read phase.

    2. Thrashing: If physical RAM is severely limited, the operating system spends more time swapping pages back and forth between disk and RAM than executing actual work, drastically slowing down performance.