Jamal has designed and built a teenytiny computer in his gar

Jamal has designed and built a teeny-tiny computer in his garage. Having paid careful attention in all his operating systems class lectures, he has implemented an operating system with all the latest features. As a result, it implements virtual memory with demand paging, but once the OS itself is accounted for, the machine only has five pages of physical memory remaining. After his operating system starts up, it runs a single process which uses 8 pages of virtual memory. His operating system uses LRU to determine which pages to evict when there is not enough physical memory to satisfy the demands (which is pretty well always). He logs the series of accesses to memory which the program makes so that he can check to make sure that his LRU implementation is working properly. The set of memory accesses, in order is: 0, 7, 0, 7, 1, 0, 2, 7, 3, 0, 7, 1, 4, 0, 7, 2, 3, 5, 0, 7, 1, 6, 2, 0, 7, 1, 0, 3, 4, 0, 7 Obviously, as the program runs, some of these memory accesses will result in page faults and this will mean that some pages in memory will need to be evicted. Please list which pages will be evicted in order. If a page is evicted more than once, list it more than once. (For example, if we had 2 pages of physical memory and the memory accesses were 0, 1, 2, 1, 0, 1, 2 then when 2 was brought in the first time, 0 would be evicted, and when 0 was brought back, 2 would be evicted, and then when 2 was brought back, 0 would be evicted again so you would simply answer: 0, 2, 0 since those are the pages which were evicted. List all pages which are evicted in the order they were evicted.)

Solution

Least Recently Used (LRU)----->

So if we are using 2 page frame then 29 page fault will occurs out of 31 request using LRU.

Access sequence 0 7 0 7 1 0 2 7 3 0 7 1 4 0 7 2 3 5 0 7 1 6 2 0 7 1 0 3 4 0 7
Frame 1 0 0 0 0 1 1 2 2 3 3 7 7 4 4 7 7 3 3 0 0 1 1 2 2 7 7 0 0 4 4 7
Frame 2 7 7 7 7 0 0 7 7 0 0 1 1 0 0 2 2 5 5 7 7 6 6 0 0 1 1 3 3 0 0
Page fault f f f f f f f f f f f f f f f f f f f f f f f f f f f f f
 Jamal has designed and built a teeny-tiny computer in his garage. Having paid careful attention in all his operating systems class lectures, he has implemented

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site