Question

Suppose an application is assigned 4 pages of physical memory and the memory is initially empty....

Suppose an application is assigned 4 pages of physical memory and the memory is
initially empty. It then references pages in the following sequence:
ACBDBAEFBFAGEFA


a. Show how the system would fault pages into the four frames of physical
memory, using the LRU replacement policy.


b. Show how the system would fault pages into the four frames of physical
memory, using the MIN replacement policy.


c. Show how the system would fault pages into the four frames of physical
memory, using the clock replacement policy.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a)

LRU replacement policy with 4 frames of physical memory.

A C B D B A E F B F A G E F A
1 A hit hit hit
2 C E G
3 B hit hit E
4 D F hit hit

b)

MIN replacement policy with 4 frames of physical memory.

A C B D B A E F B F A G E F A
1 A hit hit hit
2 C E hit
3 B hit hit G
4 D F hit hit

c)

CLK replacement policy with 4 frames of physical memory.

A C B D B A E F B F A G E F A
1 A 1 1 1 1 1 hit 1 E 1 1 1 1 1 0 hit 1 1 1
2 C 1 1 1 1 1 0 F 1 1 hit 1 1 0 0 hit 1 1
3 B 1 1 hit 1 1 0 0 hit 1 1 0 G 1 1 1 1
4 D 1 1 1 0 0 0 0 A 1 1 1 1 hit 1

hit= cache hit

1/0 means the state of the "used " bit at the end of specified step

bold italics is the position of the clock hand at the end of the specified step(this is what it will be looked at first the next time the clock hand moves)

Add a comment
Know the answer?
Add Answer to:
Suppose an application is assigned 4 pages of physical memory and the memory is initially empty....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 3. Assume a virtual memory system with the following properties: • The physical memory available to...

    3. Assume a virtual memory system with the following properties: • The physical memory available to an application consists of four-page frames, with frame numbers 0, 1, 2, and 3. The application has six pages of data in its virtual address space, using page numbers 0, 1, 2, 3, 4, and 5. Build a table showing which frame is used to bring in each page for the following sequences of page references using FIFO, MIN, and LRU as page replacement...

  • Name Olbinna COSC414/514 Quiz3 (1) Suppose a computer has 4 physical pages, and a process referen...

    Name Olbinna COSC414/514 Quiz3 (1) Suppose a computer has 4 physical pages, and a process references its virtual pages (page o through page 7) in the following order: 021354637473355311172341 Also suppose the first four pages have been loaded in the physical memory as the following figure: Frame 0 Frame 1 Frame 2 Frame 3 a. Suppose the kernel uses First-In-First-Out (FIFO) page replacement algorithm. How many page faults would the process have? Which page references are page faults? b. Suppose...

  • Consider the following page reference string: A C B D B A E F B F...

    Consider the following page reference string: A C B D B A E F B F A G E F A Assuming demand paging with four frames, how many page faults would occur for the following replacement algorithms? Remember that all frames are initially empty, so your first unique pages will cost one fault each. Show all of your works. LRU replacement FIFO replacement Optimal (MIN) replacement

  • Q. 2. (a) Suppose the OS on your computer uses the buddy system for memory management....

    Q. 2. (a) Suppose the OS on your computer uses the buddy system for memory management. Initially the system has a 1 megabyte (1024K) block of memory available, which begins at address 0.Show the results of each request/release. (7.5) A: Request 400 K B: Request 15K C: Request 100K D: Request 80 K E: Request 25 K After memory is allocated to process E, how much internal fragmentation exists in the system. (b) Assume you have a computer system with...

  • Consider the following page reference using four physical frames that are initially empty. (a) (5 points)...

    Consider the following page reference using four physical frames that are initially empty. (a) (5 points) Find the page faults using LRU algorithm, where the page reference sequence: 5,2,5,1,4,5,2,0,4,2,3,1,2,1,0,0,2,4,5,1? (b) (5 points) Find the page faults using FIFO algorithm, where the page reference sequence: 5,2,1,5,1,0,3,1,2,1,4,0,5,4, 2,3,3, 4,2,1? (c) (5 points) Find the page faults using LRU algorithm, where the page reference sequence: 5, 0, 4, 4, 0, 3, 0, 4, 1, 0, 2, 0, 5, 3, 0, 1?

  • Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1,...

    Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. How many page faults would occur for the following replacement algorithms, assuming one, two, three, four, five, six, or seven frames? Remember all frames are initially empty, so your first unique pages will all cost one fault each. • LRU replacement • FIFO replacement • Optimal replacement

  • Exercise l: Suppose that we have a virtual memory space of 28 bytes for a given process and physical memory of 4 page frames. There is no cache. Suppose that pages are 32 bytes in length. 1) How...

    Exercise l: Suppose that we have a virtual memory space of 28 bytes for a given process and physical memory of 4 page frames. There is no cache. Suppose that pages are 32 bytes in length. 1) How many bits the virtual address contain? How many bits the physical address contain? bs Suppose now that some pages from the process have been brought into main memory as shown in the following figure: Virtual memory Physical memory Page table Frame #...

  • Answer the following questions based on the Memory Management tasks of an Operating System. 5 Consider...

    Answer the following questions based on the Memory Management tasks of an Operating System. 5 Consider the following sequence of page references: 5, 6, 7, 6, 8, 7, 9, 5, 9, 6, 8, 9 Assuming that all frames are initially empty, indicate the contents of memory after each reference, and how many page faults are found for each of the following page replacement algorithms: First In First Out (FIFO):                                   [2 .5 M]                                               Reference String 5 6 7 6 8 7...

  • Consider the following sequence of page references 8, 5, 1, 8, 2, 5, 1, 4, 2, 3, 5, 3, 2, 8, 4. Assume that the memory h...

    Consider the following sequence of page references 8, 5, 1, 8, 2, 5, 1, 4, 2, 3, 5, 3, 2, 8, 4. Assume that the memory has 3 frames which initially are free. What is the number of page faults using each of the following algorithms? a. FIFO b. LRU c. Clock d. Optimal

  • 3. Virtual Memory (20 points) An ISA supports an 8 bit, byte-addressable virtual address space. The...

    3. Virtual Memory (20 points) An ISA supports an 8 bit, byte-addressable virtual address space. The corresponding physical memory has only 256 bytes. Each page contains 32 bytes. A simple, one-level translation scheme is used and the page table resides in physical memory. The initial contents of the frames of physical memory are shown below. VALUE address size 8 bit byte addressable each byte of addressing type memory has its own address 32 B page size physical memory size 256...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT