Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can anyone help me please, I have like 30 minutes and Ive been stuck in traffic

ID: 3850195 • Letter: C

Question

Can anyone help me please, I have like 30 minutes and Ive been stuck in traffic forever,

5. A process has a memory reference pattern as follows:

1 3 1 2 3 4 2 3 1 2 3 4

The above pattern (which represents the virtual page numbers of the process) repeats

throughout the execution of the process. Assume that there are 3 physical frames.

Show the paging activity for a True LRU page replacement policy. Show an LRU

stack and the page that is replaced (if any) for the first 12 accesses. Clearly indicate

which accesses are hits and which are page faults.

Solution:

1

3

1

2

3

4

2

3

1

2

3

4

F1

F2

F3

LRU

H/PF

H: hit   PF: Page fault

6. A process has a memory reference pattern as follows:   

4 3 1 2 3 4 1 4 1 2 3 4

The above pattern (which represents the virtual page numbers of the process) repeats

throughout the execution of the process.

What would be the paging activity for an optimal page replacement policy for the first

12 accesses? Indicate which accesses are hits and which are page faults.

Solution:

4

3

1

2

3

4

1

4

1

2

3

4

F1

F2

F3

H/PF

Assume there are only three available physical frames. And H = hit,   PF = Page Fault.

1

3

1

2

3

4

2

3

1

2

3

4

F1

F2

F3

LRU

H/PF

Explanation / Answer

5.

Number of hits = 6

Number of Faults = 6

6. Optimal Page replacement

Number of hits = 6

Number of Page Faults = 6

1 3 1 2 3 4 2 3 1 2 3 4 F1 1 1 1 1 1 4 4 4 1 1 1 4 F2 3 3 3 3 3 3 3 3 3 3 3 F3 2 2 2 2 2 2 2 2 2 LRU - 1 3 3 1 2 3 4 2 3 1 2 H/PF PF PF H PF H PF H H PF H H PF
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote