Operating Systems: Memory Management
Operating Systems: Memory Management
CS F372
Memory Management
Biju K Raveendran
Effective Access Time
• Example
– Hit ratio 80%
– 20 nsec to search in TLB
– 100 nsec to access Memory
– Effective Memory Access Time [Assume no Cache]
– (E M A T) = (0.80 X 120) + (0.20 X 220) = 140 nsec
– (0.8 X 120 + 0.2 X 120) / 0.8 = 150nSec
If hit ratio is 98% then
EAT = (0.98 X 120) + (0.02 X 120) / 0.98= 122.45 nsec
Wednesday, November 27,
Biju K Raveendran @ BITS Pilani Goa 2
2019
Wednesday, November 27,
Biju K Raveendran @ BITS Pilani Goa 3
2019
Memory Protection
• Memory protection implemented by associating
protection bit with each frame
• One bit to specify the page is read write or read only
• Valid-invalid bit attached to each entry in the page
table:
– “valid” indicates that the associated page is in the
process’ logical address space, and is thus a legal
page
– “invalid” indicates that the page is not in the process’
logical address space
Wednesday, November 27,
Biju K Raveendran @ BITS Pilani Goa 4
2019
Valid (v) or Invalid (i) bit in a page table
32 10 10 12
Wednesday, November 27,
Biju K Raveendran @ BITS Pilani Goa 9
2019
Address Translation Scheme