Question

In: Electrical Engineering

Optimal and near-optimal process scheduling and page replacement algorithms. a) What is the theoretically best process...

Optimal and near-optimal process scheduling and page replacement algorithms.

a) What is the theoretically best process scheduling algorithm?

b) Do shortest job first and shortest remaining time first amount to the same thing or not?

c) Can they be directly implemented?

d) What do you consider the next best scheduling option, and how does it use the recent past to approximate the ideal case?

e) Consider the analogous case in page replacement. What is the best possible choice of page to replace?

f) Can this be known? If not, what is the best approximation of the ideal case, and how does it use knowledge of the recent past to implement it?

g) What is the overhead involved in keeping track of the recent past in the case of page replacement?

Solutions

Expert Solution

near-optimal process scheduling and page replacement algorithm is the theoretically best process scheduling page replacement algorithm

SJF and STRF are same onlt the diffrence is the terms used in non preemtive (SJF) kernel & preemtive (SRTF) kernel

Optimal process scheduling page replacement algorithm is difficult / cannot be implemented as it is very difficult to find out the time when the page is used next time. Also this is possible only when run time analysis of applications is known OR the software running on the system is priory known.

But near-optimal process scheduling page replacement algorithm can be used which can provide nearly optimal performance. In this algorithm OS keeps record of all page references. & OS uses this data to decide which pages to be replaced subsequently.

Ideal example for page replacement in optimal page replacement:

  1. If required page is already present, then increment count.
  2. If not present, find a page that is never referenced will be referred later in future. If such a page exists, replace this page with new page. If no such page exists, find a page that is referenced farthest in future. Replace this page with new page.

Related Solutions

Write a program that implements the FIFO, LRU, and Optimal page replacement algorithms presented in chapter...
Write a program that implements the FIFO, LRU, and Optimal page replacement algorithms presented in chapter 8 of your text. First generate a random page-reference string (this should be 20 entries long) where page numbers range from 0 to 9. Apply the random page-reference string to each algorithm, and record the number of page faults incurred by each algorithm. Implement the replacement algorithms so that the number of page frames goes from 1 to 7 and you must compute the...
Page Replacement Algorithms. Consider the following page reference stream and 3 page frames: 0 1 2...
Page Replacement Algorithms. Consider the following page reference stream and 3 page frames: 0 1 2 3 2 4 3 1 1 5 2 4 6 3 3 4 6 3 4 7. For the MIN, FIFO, and LRU algorithms, show the contents of the page frame after each reference, and then compute the total number of page faults, divided in to cold misses and other misses.
List of six process scheduling algorithms (for operating systems): First-Come, First-Served (FCFS) Scheduling Shortest-Job-Next (SJN) Scheduling...
List of six process scheduling algorithms (for operating systems): First-Come, First-Served (FCFS) Scheduling Shortest-Job-Next (SJN) Scheduling Priority Scheduling Shortest Remaining Time Round Robin(RR) Scheduling Multiple-Level Queues Scheduling Compare and contrast the algorithms against one another here. You have at least six algorithms, so this should be an extensive part of the project, and all research based.
List and define the alternative page fetch policies.   (0.5 point each) What are three replacement algorithms?...
List and define the alternative page fetch policies.   (0.5 point each) What are three replacement algorithms? (.333 points each) What is the purpose of the TLB?   (0.5 points)
Develop an algorithm and implement Optimal Page Replacement algorithm using C++. Determine the number of page...
Develop an algorithm and implement Optimal Page Replacement algorithm using C++. Determine the number of page faults and page hits by considering the Frame size=4, ReferenceString:2 4 6 7 8 2 4 9 13 9 2 7 2 6 1 4 9 2
What are the four strategies for process scheduling (that determines which process is next in line...
What are the four strategies for process scheduling (that determines which process is next in line for CPU resources)
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2 Marks]...
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2 Marks]...
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2 Marks]...
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling. (b) Preemptive PRIORITY scheduling . (c) Highest Response Ratio Next (HRRN) scheduling. (d) Round Robin (RR) (quantum = 4) scheduling. (e) Which of the foregoing scheduling policies provides the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT