Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 6307 Foundation of Systems – Exercise (4) Xiang Lian The University of Texas – Pan American Edinburg, TX 78539 1.

Similar presentations


Presentation on theme: "CSCI 6307 Foundation of Systems – Exercise (4) Xiang Lian The University of Texas – Pan American Edinburg, TX 78539 1."— Presentation transcript:

1 CSCI 6307 Foundation of Systems – Exercise (4) Xiang Lian The University of Texas – Pan American Edinburg, TX 78539 lianx@utpa.edu 1

2 Exercise Consider a swapping system in which memory consists of the following hole sizes in memory order: 600, 500, 1000, 503, 400, 1050, and 1600 bytes. Which block will be selected for successive requests of: – 500, 503, 100, 1003 using first-fit, best-fit, worst-fit, or next-fit policy. 2

3 Exercise Consider decimal virtual addresses – 10000 – 23406 – 40000 Compute the virtual page numbers and offsets with page size 4KB 3

4 Exercise Suppose R= 3, 2, 4, 3, 4, 2, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 5, 6, 7, 2, 1 is a page reference stream. Given a page frame allocation of 3, and assuming the primary memory is initially unloaded, how many page faults will the given reference stream incur under: FIFO Belady’s optimal algorithm LRU 4

5 FIFO 5 3 2 4 3 2 33 2 4 3243422345677654567213 2 4 3 2 4 3 2 4 3 2 4 3 2 4

6 Belady’s Algorithm 6 3 2 4 3 2 33 2 4 3243422345677654567213 2 4 3 2 4 3 2 4 3 2 4 3 2 4

7 LRU 7 3 2 4 3 2 33 2 4 3243422345677654567213 2 4 3 2 4 3 2 4 3 2 4 3 2 4


Download ppt "CSCI 6307 Foundation of Systems – Exercise (4) Xiang Lian The University of Texas – Pan American Edinburg, TX 78539 1."

Similar presentations


Ads by Google