Professional Documents
Culture Documents
Week 9
Week 9
1. Suppose we have a byte-addressable computer using fully associative mapping with 16-bit
main memory addresses and 32 blocks of cache. If each block contains 16 bytes, determine
the size of the offset field.
ANS
Main memory =16 bits
Cache = 32 blocks
Block Size= 16 bytes
Size of offset field=?
Block size
= 16 bytes
= 24 bytes
2. Suppose we have a byte-addressable computer using fully associative mapping with 16-bit
main memory addresses and 32 blocks of cache. If each block contains 16 bytes, determine
the size of the tag field.
ANS
Memory address size= 16 bits
Number of cache blocks= 32
Size of each block = 16 bytes
Offest field = Size of each block= 2^{4} = 4 bits
Tag field size = 16(Total number of bits) - 4 (Offset field size) = 12
3. How caching and virtual memory help to enhance the performance of computers?
ANS
Because cache memory is quicker than RAM and is closer to the CPU, it can receive and
begin processing instructions and data much more rapidly. When data or instructions need
to be written back to memory, the same technique is used. A virtual memory system
emulates RAM by utilising a part of the hard disc. Virtual memory allows a system to execute
bigger or numerous programmes at the same time, allowing each one to function as if it had
more memory without needing to buy extra RAM.
5. What is memory fragmentation? How external and internal fragmentation take place?
ANS
Memory fragmentation is a kind of memory disruption characterised by defects or
inconsistencies in memory sequences, as well as "coherence and substance" in the narrative
or tale of the event. Internal fragmentation occurs when memory is divided into fixed-sized
partitions. External fragmentation occurs when memory is divided into variable size
partitions based on the size of processes.