Download presentation
Presentation is loading. Please wait.
1
CPSC 457 Operating Systems
Midterm Review: Practical Questions
2
Q1 Describe the steps that occur when a user program to executes a system call (assuming that there is a system library to wrap the call). CPSC Tyson Kendon 2016
3
Q2 Describe the steps that occur when the operating system performs a context switch between processes. CPSC Tyson Kendon 2016
4
Q3 Consider the following table of process, all of which are available at the time of scheduling and arrived in the order in which they are numbered , with the given burst times and priorities (lower numbers are higher priority). Process Burst Time Priority P1 8ms 2 P2 4ms 1 P3 10ms P4 2ms P5 CPSC Tyson Kendon 2016
5
Q3 Draw the Gantt chart and calculate the average turnaround time for the following algorithms. 3a) First Come, First Served 3b) Shortest Job First 3c) Priority 3d) Round Robin (with a 5ms time quantum) CPSC Tyson Kendon 2016
6
Q4 Consider the following table of process, with the given burst and arrival times Process Burst Time Arrival Time P1 8ms 0 ms P2 4ms 4 ms P3 10ms 6 ms P4 2ms 12 ms P5 18 ms CPSC Tyson Kendon 2016
7
4a) Shortest Job First (Non-Preemptive)
Draw the Gantt chart and calculate the average turnaround time for the following algorithms. 4a) Shortest Job First (Non-Preemptive) 4b) Shortest Job First (Preemptive) 4c) Round Robin (with a 5ms time quantum) 4d) A Multi-Level Feedback Queue with 3 queues, a high priority queue served with Round Robin with a a 2 ms quantum, a medium priority queue served with Round Robin with a a 6 ms quantum, a low priority queue served First Come First Served. a job is preempted if a higher priority job is available. A preempted job is put on the HEAD of its queue. CPSC Tyson Kendon 2016
8
Q5 5) Recall the formula calculating exponential average: ♣️n+1 = ♥️tn + (1 - ♥️) ♣️n For a process with the following real burst times, an initial estimated burst time of (4 ms) and a memory factor () of .5 calculate estimated burst times for each n. (Round to the nearest integer ms) 1 2 3 4 Estimated Burst 5ms Real Burst 10ms 2ms 8ms 3ms 12ms CPSC Tyson Kendon 2016
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.