How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Arty Your Own Question
Arty
Arty, Computer Support Specialist
Category: Computer
Satisfied Customers: 575
Experience:  SCSA, SCNA, 14 years in IT, DOS, Windows, Linux, FreeBSD, Solaris admin and software developer
31145473
Type Your Computer Question Here...
Arty is online now
A new question is answered every 9 seconds

Regarding Understanding Operating Systems - Ann Mciver bookhere

This answer was rated:

Regarding "Understanding Operating Systems"- Ann Mciver book
here is the exercise I have to complete:

1. Given that main memory is composed of three page frames for public use and that a program requests pages in the following order: D C B A D C E D C B A E
a. Using the FIFO page removal algorithm, do a page trace analysis indicating page faults with asterisks (*). Then compute the failure and success ratios.
b. Increase the size of memory so it contains four page frames for public use. Using the same page requests as above and FIFO, do another page trace analysisand compute the failure sucess ratios.
c. Did the result correspond with your intuition? Explain

Given that main memory is composed of three page frames for public use and that a program requests pages pages in the following order: A B A C A B D B A C D
A. Using the FIFO page removal algorithm, do a page trace analisys indicating page faults with asterisks. Compute failure & success ratio.
b. Using LRU page removal algorithm do a page trace analisys and compute the failute and success ratio.
c. why is better? can you make a general statement for this example? why or why not?
d. Let us define most recently used MRU as a page removal algorithm that removes from memory the most recently used page. Do a page trace analysis using the same page request as before anc compute the failures and sucess ratios
e. which of the three page removal algorithms is best and why u think so?
HiCustomer Thank you for asking your question on JustAnswer. The other Experts and I are working on your answer. By the way, it would help us to know: -What operating system are you using? -What internet browser are you using? -What have you already tried? Thank you again for trusting us with your problem. Please reply as soon as possible so that we can finish answering your question. > 1. Given that main memory is composed of three page frames for public use and that a program requests pages in the following order: D C B A D C E D C B A E

> a. Using the FIFO page removal algorithm, do a page trace analysis indicating page faults with asterisks (*). Then compute the failure and success ratios.

D C B A(*) D(*) C(*) E(*) D C B(*) A(*) E

What does it mean? SEE (it's example only, all the results below can be broken down the same way), here are steps 1)-12), and memory 'frame' content:
1) D
2) D C
3) D C B
*4) C B A // page fault, we remove D as it is first
*5) B A D // page fault, we remove C and append D
*6) A D C // page fault, we remove B and append C
*7) D C E // page fault, we remove A and append E
8) D C E // D already here
9) D C E // C already here
*10) C E B // page fault, remove D, append B
*11) E B A // page fault, remove C, append A
12) E B A // E is already here

failure/success ratio is: 6/6 = 1

b. Increase the size of memory so it contains four page frames for public use. Using the same page requests as above and FIFO, do another page trace analysis and compute the failure success ratios.

D C B A D C E(*) D(*) C(*) B(*) A(*) E(*)
failure/success ratio is: 6/6 = 1

c. Did the result correspond with your intuition? Explain

They didn't. I expect that it would be less page faults. But we have 6 page faults regardless of the frame size. It happens because the _order_ and number or page requests and frame size are not 'optimal' for FIFO algorithm (we have not the worst possible scenario but near).

> Given that main memory is composed of three page frames for public use and that a program requests pages pages in the following order: A B A C A B D B A C D

A. Using the FIFO page removal algorithm, do a page trace analysis indicating page faults with asterisks. Compute failure & success ratio.

A B A C A B D(*) B A(*) C D
failure/success ratio is 2/9

b. Using LRU page removal algorithm do a page trace analysis and compute the failure
and success ratio.

A B A C A B D(*) B A C(*) D(*)
failure/success ratio is 3/9 = 1/3

c. why is better? can you make a general statement for this example? why or why not?

It's better than in previous FIFO example, because 'memory use pattern' is more 'optimal' for us. Most time we use not more than 'frame size' number of pages. I.e. we use previously used pages more often, than in the first example.

Also FIFO is better than LRU in our case (2/9 vs 1/3).

d. Let us define most recently used MRU as a page removal algorithm that removes from memory the most recently used page. Do a page trace analysis using the same page request as before and compute the failures and success ratios

A B A C A B D(*) B(*) A C D(*)
failure/success ratio is 3/9 = 1/3

FIFO still better.

e. which of the three page removal algorithms is best and why u think so?

There is no 'best' algorithm. Algorithm quality depends on how application uses memory.
Say if application runs 'code' within these requested page frames, there is low probability that it will request previously 'seen' memory, in that case FIFO or MRU may be better (we should forget pages either sequentially or most recently accessed first). If application uses memory as a 'cache' for caching some content - LRU algorithm may be more effective. Usefulness of MRU is questionable and not efficient, because it doesn't get advantage of big 'frame size', it forgets everything that where just requested.
Arty and 10 other Computer Specialists are ready to help you
Customer: replied 7 years ago.
Thank you for all your help!

Related Computer Questions