Question

onsider the following page reference string: 3, 8, 2, 9, 8, 2, 3, 9, 2, 8...

onsider the following page reference string:

3, 8, 2, 9, 8, 2, 3, 9, 2, 8

  1. Assuming demand paging with three frames, how many page faults would occur for the following replacement algorithms? Show your working. (10-marks)
    1. First in First out
    2. Least Recently Used
    3. Optimal Replacement
  2. Calculate the no. of page faults for each algorithm. (3-marks)
  3. Which algorithm performs best for the given reference string? (2-marks)

Homework Answers

Answer #1

3,8,2,9,8,2,3,9,2,8

A. FIFO

Ref 3 8 2 9 8 2 3 9 2 8
F#1 3 3 3 9 9 9 9 9 9 9
F#2 8 8 8 8 8 3 3 3 3
F#3 2 2 2 2 2 2 2 8
H/F F F F F H H F H H F

Total number of page fault=6

B. RECENTLY USED

Ref# 3 8 2 9 8 2 3 9 2 8
F#1 3 8 2 9 8 2 3 9 2 8
F#2 3 8 2 9 8 2 3 9 2
F#3 3 8 2 9 8 2 3 9
H/F F F F F H H F F H F

TOTAL NUMBER OF PAGE FAULT=7

C. OPTIMAL PAGE REPLACEMENT

Ref# 3 8 2 9 8 2 3 9 2 8
F#1 3 3 3 9 9 9 9 9 9 8
F#2 8 8 8 8 8 3 3 3 3
F#3 2 2 2 2 2 2 2 2
H/F F F F F H H F H H F

TOTAL NUMBER OF PAGE FAULT = 6

Algorithm FIFO and Optimal page replacement both performs equally well in this case.

But usually OptimalPage Replacement gives better performance.

If you are satisfied with answer please? upvote thanks....

Know the answer?
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
Similar Questions
Consider the following page reference string: 7, 2, 3, 1, 2, 5, 3, 7, 6, 7...
Consider the following page reference string: 7, 2, 3, 1, 2, 5, 3, 7, 6, 7 Assuming demand paging with three frames, how many page faults would occur for the following replacement algorithms? Show your working. First in First out Least Recently Used Optimal Replacement Calculate the no. of page faults for each algorithm. Which algorithm performs best for the given reference string?
1. What is the average waiting time for Processes If the Operating System uses the Shortest-Job-First...
1. What is the average waiting time for Processes If the Operating System uses the Shortest-Job-First (SJF) Scheduling Algorithm? (P1=5 ms, P2=10 ms, P3=15 ms) 2. How many page faults occur in the Optimum Page Replacement algorithm (OPR) with the following reference string for three-page frames?    Reference String: 4,2,1,3,2,3,4,1 3. What is the average waiting time for Processes If the Operating System uses Shortest-Job-Remaining-First (SJRF) Scheduling Algorithm? (P1=5 ms, P2=10 ms, P3=15 ms) Arrival Time ( P1=0 ms, P2=5...
Process Burst Arrival-time Priority A 2 1 3 B 8 0 2 C 3 1 2...
Process Burst Arrival-time Priority A 2 1 3 B 8 0 2 C 3 1 2 D 12 2 1 Note: A lower priority number indicates a higher priority. (Show all your working) For each of the following CPU scheduling algorithms, determine the turnaround and wait times for each process as well as the average wait and turnaround times. First Come First Serve Preemptive Priority Scheduling
: Process Burst Arrival-time Priority A 2 1 3 B 8 0 2 C 3 1...
: Process Burst Arrival-time Priority A 2 1 3 B 8 0 2 C 3 1 2 D 12 2 1 Note: A lower priority number indicates a higher priority For each of the following CPU scheduling algorithms, determine the turnaround and wait times for each process as well as the average wait and turnaround times. Show all your working. First Come First Serve Preemptive Priority Scheduling
Consider the following: period 1, 2, 3, 4, 5, 6, 7, 8 demand 7, 8, 9,...
Consider the following: period 1, 2, 3, 4, 5, 6, 7, 8 demand 7, 8, 9, 10, 14, 16, 13, 16 a. using a trend projection, forecast the demand for period 9 b. calculate the MAD for this forecast Show all work! do not use excel or phstat!!!
Consider the following population: {7, 8, 8, 9, 9}. The value of μ is 8.2, but...
Consider the following population: {7, 8, 8, 9, 9}. The value of μ is 8.2, but suppose that this is not known to an investigator. Three possible statistics for estimating μ are Statistic 1: the sample mean, x Statistic 2: the sample median Statistic 3: the average of the largest and the smallest values in the sample A random sample of size 3 will be selected without replacement. Provided that we disregard the order in which the observations are selected,...
Question 4 Write a regular expression that generates each of the following language constructs: (1) String...
Question 4 Write a regular expression that generates each of the following language constructs: (1) String constants with the following specifications: A string constant consists of any sequence of characters enclosed by the quotation marks: “ and ”       The sequence may be empty.                    The sequence cannot span multiple lines.       Don’t worry about escape characters (assume that they won’t appear in the input).       (2)  Multiple-line comment in C, C++ and JAVA with the following specifications:        The comment consists of any sequence...
Given the following unordered array: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]...
Given the following unordered array: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] W X D T P N R Q K M E If the array was being sorted using the SHELL sort and the halving method, and sorting into ASCENDING order as demonstrated in the course content, list the letters in the resulting array, in order AFTER the FIRST pass. [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
For the following set of scores: 7 5 6 4 4 3 8 9 4 7...
For the following set of scores: 7 5 6 4 4 3 8 9 4 7 5 5 6 9 4 7 5 10 6 8 5 6 3 4 8 5 a. Construct a frequency distribution table. b. Sketch a histogram showing the distribution. c. Describe the distribution using the following characteristics: (1) What is the shape of the distribution? (2) What score best identifies the center (average) for the distribution? (3) Are the scores clustered together, or are...
Consider the following data: 6, 8, 2, 3, 4, 4, 5, 5, 9, 6, 6, 7,...
Consider the following data: 6, 8, 2, 3, 4, 4, 5, 5, 9, 6, 6, 7, 7 ,7, 7, 8, 8, 8, 8, 9, 9. What type of distribution is this?