The document discusses various CPU scheduling algorithms. It begins by classifying CPU scheduling as either preemptive or non-preemptive. It then lists performance criteria for good schedulers such as CPU utilization and response time. The document proceeds to describe scheduling algorithms including First-Come First-Served (FCFS), Shortest Process First (SPF), Shortest Remaining Time First (SRTF), Round Robin (RR), Priority Scheduling, and Multilevel Feedback Queues. Examples are provided to demonstrate how each algorithm works.
Operating Systems Process Scheduling Algorithmssathish sak
CPU scheduling big area of research in early ‘70s
Many implicit assumptions for CPU scheduling:
One program per user
One thread per program
Programs are independent
These are unrealistic but simplify the problem
Does “fair” mean fairness among users or programs?
If I run one compilation job and you run five, do you get five times as much CPU?
Often times, yes!
Goal: dole out CPU time to optimize some desired parameters of the system.
Operating Systems Process Scheduling Algorithmssathish sak
CPU scheduling big area of research in early ‘70s
Many implicit assumptions for CPU scheduling:
One program per user
One thread per program
Programs are independent
These are unrealistic but simplify the problem
Does “fair” mean fairness among users or programs?
If I run one compilation job and you run five, do you get five times as much CPU?
Often times, yes!
Goal: dole out CPU time to optimize some desired parameters of the system.
presentation on real time operating system(RTOS's)chetan mudenoor
Real time Operating Systems are very fast and quick respondent systems. These systems are used in an environment where a large number of events (generally external) must be accepted and processed in a short time.
This presentation covers the understanding of system calls for various resource management and covers system calls for file management in details. The understanding of using system calls helps to start with working with device driver programming on Unix/Linux OS.
CPU Scheduling: Dispatcher, CPU scheduling is a process which allows one process to use the CPU while the execution of another process is on hold(in waiting state) due to unavailability of any resource like I/O etc., thereby making full use of CPU. The aim of CPU scheduling is to make the system efficient, fast and fair.
The dispatcher is the module that gives control of the CPU to the process selected by the
short-term scheduler.
operating systems , ch-05, (CPU Scheduling), 3rd level, College of Computers, Seiyun University. انظمة التشغيل لطلاب المستوى الثالث بكلية الحاسبات بجامعة سيئون المحاضرة 05
What is the waiting time of each process for each of the scheduling a.pdfpearlcoburnsanche303
What is the waiting time of each process for each of the scheduling algorithms?
Solution
First-Come, First-Served (FCFS) Scheduling
Process Burst Time
P1 24
P2 3
P3 3
Suppose that the processes arrive in the order: P1 , P2 , P3
The Gantt Chart for the schedule is:
P1
P2
P3
0 24 27 30
Waiting time for P1 = 0; P2 = 24; P3 = 27
SJF
Process Arrival Time Burst Time
P1 0.0 7
P2 2.0 4
P3 4.0 1
P4 5.0 4
SJF (non-preemptive)
P1
P3
P2
P4
0 7 8 12 16
Average waiting time = [0 +(8-2)+(7-4) +(12-5)] /4 =4
Example of Preemptive SJF
Proces Arrival Time Burst Time
P1 0.0 7
P2 2.0 4
P3 4.0 1
P4 5.0 4
SJF (preemptive)
P1
P2
P3
P2
P4
P1
0 2 4 5 7 11 16
Average waiting time = (9 + 1 + 0 +2)/4 =3
Round Robin (RR)
Each process gets a small unit of CPU time (time quantum), usually 10-100 milliseconds. After
this time has elapsed, the process is preempted and added to the end of the ready queue.
If there are n processes in the ready queue and the time quantum is q, then each process gets 1/n
of the
CPU time in chunks of at most q time units at once. No process waits more than (n-1)q time
units.
Performance
1. q large _ FIFO
2. q small _ q must be large with respect to context switch, otherwise overhead is too high.
Example of RR with Time Quantum = 4
Process Burst Time
P1 24
P2 3
P3 3
The Gantt chart is:
P1
P2
P3
P1
P1
P1
P1
P1
0 4 7 10 14 18 22 26 30
Average waiting time = [(30-24)+4+7]/3 = 17/3 =5.66
P1
P2
P3.
Instruction1. Please read the two articles. (Kincheloe part 1 &.docxcarliotwaycave
Instruction:
1. Please read the two articles. (Kincheloe part 1 & 2)
2. Please choose some of the topics covered in each chapter, provide a brief summary (2-3 sentences) of those topics.
3. Then add your reflections, insights, or relevant experiences, etc. to help illustrate or expand upon the course.
4. This journal should be at least 400 words.
p5-start.cppp5-start.cpp/**
* @author Jane Student
* @cwid 123 45 678
* @class CSci 430, Spring 2018
* @ide Visual Studio Express 2010
* @date November 15, 2018
* @assg prog-04
*
* @description This program implements a simulation of process
* scheduling policies. In this program, we implement round-robin
* scheduling, where the time slice quantum can be specified as
* as a command line parameter. And we also implement shortest
* remaining time (SRT) scheduling policy
*/
#include<stdlib.h>
#include<iostream>
#include<iomanip>
#include<fstream>
#include<string>
#include<list>
usingnamespace std;
// global constants
// I won't test your round robin implementation with more than 20 processes
constint MAX_PROCESSES =20;
constint NO_PROCESS =0;
// Simple structure, holds all of the information about processes, their names
// arrival and service times, that we are to simulate.
typedefstruct
{
string processName;
int arrivalTime;
int serviceTime;
// holds running count of time slices for current time quantum, when
// serviceTime == quantum, time slice is up
int sliceTime;
// holds total number of time steps currently run, when == to
// serviceTime process is done
int totalTime;
// holds time when process finishes, used to calculate final stats,
// like T_r, T_r/T_s
int finishTime;
// a boolean flag, we will set this to true when the process is complete
bool finished;
}Process;
// Process table, holds table of information about processes we are simulating
typedefstruct
{
int numProcesses;
Process* process[MAX_PROCESSES];
}ProcessTable;
/** Create process table
* Allocate memory for a new process table. Load the process
* information from the simulation file into a table with the process
* information needed to perform the simulation. At the same time we
* initialize other information in process table for use in the
* simulation. Return the newly created ProcessTable
*
* @param processFilanem The name (char*) of the file to open and read
* the process information from.
* @param processTable This is actually a return parameter. This
* should be a pointer to an already allocated array of
* Process structure items. We will fill in this structure
* and return the process information.
*
* @returns ProcessTable* The newly allocated and initialized ProcessTable
* structure.
*/
ProcessTable* createProcessTable(char* processFilename)
{
ifstream simprocessfile(processFilename);
ProcessTable* processTable;
int pid;
string processName;
int arrivalTime;
int serviceTime;
// If we can't open file, abort and let ...
Similar to 05 lcd slides 1 - CPU SCHEDULING (Powerpoint) (20)
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
2. *Property of STI J0024
CPU scheduling may be classified as:
Non-preemptive scheduling
CPU scheduling is non-preemptive if once the CPU has been assigned to a
process and the process starts executing, the CPU cannot be taken away from
that process.
Preemptive scheduling
In preemptive CPU scheduling, even though the CPU has been assigned to a
process and the process is already executing, the CPU scheduler may decide to
assign the CPU to another process in the ready queue.
3. *Property of STI J0024
A good scheduler should optimize the following performance criteria:
CPU utilization
Throughput
Turnaround time
Response time
Waiting time
4. *Property of STI J0024
The different CPU scheduling algorithms are:
First-Come, First-Served Algorithm
Shortest Process First Algorithm
Shortest Remaining Time First Algorithm
Round Robin Algorithm
Priority Scheduling
Multilevel Feedback Queues
5. *Property of STI J0024
First-Come, First-Served Algorithm (FCFS)
- the one that enters the Ready queue first gets to execute at the CPU first
a.
b.
c.
A
0 8
A
0
B
8 12
A
0
B C
8 12 17
6. *Property of STI J0024
First-Come, First-Served Algorithm (FCFS)
d.
e.
WTA = 0 – 0 = 0 ms
WTB = 8 – 3 = 5 ms
WTC = 12 – 4 = 8 ms
WTD = 17 – 6 = 11 ms
WTE = 20 – 10 = 10 ms
The average waiting time is
(0 + 5 + 8 + 11 + 10)/5 = 34/5 = 6.8 ms
A
0
B C D
8 12 17 20
A
0
B C D
8 12 17 20
E
22
7. *Property of STI J0024
First-Come, First-Served Algorithm (FCFS)
TAA = 8 - 0= 8 ms
TAB = 12 - 3 = 9 ms
TAC = 17 - 4 = 13 ms
TAD = 20 - 6 = 14 ms
TAE = 22 - 10 = 12 ms
The average turnaround time is
(8 + 9 + 13 + 14 + 12)/5 = 56/5 = 11.2 ms
8. *Property of STI J0024
Shortest Process First Algorithm (SPF)
- the process with the shortest CPU burst
a.
b.
c.
A
0 8
A
0
D
8 11
A
0
D
8 11 13
E
9. *Property of STI J0024
Shortest Process First Algorithm (SPF)
d.
e.
WTA = 0 – 0 = 0 ms
WTB = 13 – 3 = 10 ms
WTC = 17 – 4 = 13 ms
WTD = 8 – 6 = 2 ms
WTE = 11 – 10 = 1 ms
The average waiting time is
(0 + 10 + 13 + 2 + 1)/5 = 26/5 = 5.2 ms
A
0
BD
8 11 13 17
E
A
0
B CD
8 11 13 17
E
22
10. *Property of STI J0024
Shortest Process First Algorithm (SPF)
TAA = 8- 0 = 8 ms
TAB = 17 - 3 = 14 ms
TAC = 22 - 4 = 18 ms
TAD = 11 - 6 = 5 ms
TAE = 13 - 10 = 3 ms
The average turnaround time is
(8 + 14 + 18 + 5 + 3)/5 = 48/5 = 9.6 ms
11. *Property of STI J0024
Shortest Remaining Time First Algorithm (SRTF)
- the preemptive version of SPF
a.
b.
c.
d.
Process ID Arrival Time CPU Burst
A 0 8
B 3 4
C 4 5
D 6 3
E 10 2
0
A
0
A
3
B
0
B
7
A
3
0
B
7
DA
3
12. *Property of STI J0024
Shortest Remaining Time First Algorithm (SRTF)
e.
f.
g.
h.
WTA = (0 – 0) + (12 – 3) = 9 ms
WTB = 3 – 3 = 0 ms
WTC = 17 – 4 = 13 ms
WTD = 7 – 6 = 1 ms
WTE = 10 – 10 = 0 ms
The average waiting time is
(9 + 0 + 13 + 1 + 0)/5 = 23/5 = 4.6 ms
0
B D
7 10
A
3
0
B D
7 10 12
EA
3
A
0
B D
7 10 12 17
EA
3
A
0
B CD
7 10 12 17
E
22
A
3
13. *Property of STI J0024
Shortest Remaining Time First Algorithm (SRTF)
TAA = 17 - 0= 17 ms
TAB = 7 - 3 = 4 ms
TAC = 22 - 4 = 18 ms
TAD = 10 - 6 = 4 ms
TAE = 12 - 10 = 2 ms
The average turnaround time is
(17 + 4 + 18 + 4 + 2)/5 = 45/5 = 9.0 ms
14. *Property of STI J0024
Round Robin Algorithm (RR)
- the process are selected on a first-come, first-served basis. However, each
process is given a time limit to execute at the CPU.
Assume a time quantum of 3 ms.
a.
b.
Process ID Arrival Time CPU Burst
A 0 8
B 3 4
C 4 5
D 6 3
E 10 2
0
A
3
0
B
6
A
3
15. *Property of STI J0024
Round Robin Algorithm (RR)
c.
d.
e
f.
g.
h
i.
0
B A
6 9
A
3
0
B A
6 9 12
CA
3
D
0
B A
6 9 12 15
CA
3
D
0
B A
6 9 12 15
CA
3
B
16
D
0
B A
6 9 12 15
CA
3
B
16
A
18
D
0
B A
6 9 12 15
CA
3
B
16
A
18
E
20
D
0
B CA
6 9 12 15
C
22
A
3
B
16
A
18
E
20
16. *Property of STI J0024
Round Robin Algorithm (RR)
WTA = (0 – 0) + (6 – 3) + (16 – 9) = 10 ms
WTB = (3 – 3) + (15 – 6) = 9 ms
WTC = (9 – 4) + (20 – 12) = 13 ms
WTD = 12 – 6 = 6 ms
WTE = 18 – 10 = 8 ms
The average waiting time is
(10 + 9 + 13 + 6 + 8)/5 = 46/5 = 9.2 ms
17. *Property of STI J0024
Round Robin Algorithm (RR)
TAA = 18 - 6= 18 ms
TAB = 16 - 3 = 13 ms
TAC = 22 - 4 = 18 ms
TAD = 15 - 6 = 9 ms
TAE = 20 - 10 = 10 ms
The average turnaround time is
(18 + 13 + 18 + 9 + 10)/5 = 68/5 = 13.6 ms
18. *Property of STI J0024
Priority Scheduling
- Each process is assigned a priority and the CPU scheduler selects the process in
the ready queue with the highest priority to execute next.
Using the non-preemptive priority algorithm:
a.
b.
Process ID Arrival
Time
CPU Burst Priority
A 0 8 4
B 3 4 3
C 4 5 1
D 6 3 2
E 10 2 2
A
0 8
A
0
C
8 13
19. *Property of STI J0024
Priority Scheduling
c.
d.
e.
WTA = 0 – 0 = 0 ms
WTB = 18 – 3 = 15 ms
WTC = 8 – 4 = 4 ms
WTD = 13 – 6 = 7 ms
WTE = 16 – 10 = 6 ms
The average waiting time is
(0 + 15 + 4 + 7 + 6)/5 = 32/5 = 6.4 ms
A
0
C D
8 13 16
A
0
C D
8 13 16 18
E
A
0
BC D
8 13 16 18
E
22
20. *Property of STI J0024
Priority Scheduling
TAA = 8 - 0= 8 ms
TAB = 22 – 3 = 19 ms
TAC = 13 - 4 = 9 ms
TAD = 16 - 6 = 10 ms
TAE = 18 - 10 = 8 ms
The average turnaround time is
(8 + 19 + 9 + 10 + 8)/5 = 54/5 = 10.8 ms
21. *Property of STI J0024
Priority Scheduling
Using the preemptive priority algorithm:
a.
b.
c.
d.
Process ID Arrival
Time
CPU Burst Priority
A 0 8 4
B 3 4 3
C 4 5 1
D 6 3 2
E 10 2 2
0
A
0
BA
3
0
B C
4 9
A
3
0
B C
4 9
A
3
D
22. *Property of STI J0024
Priority Scheduling
e.
f.
WTA = (0 – 0) + (17 – 3) = 14 ms
WTB = (3 – 3) + (14 - 4) = 10 ms
WTC = (4 – 4) = 0 ms
WTD = (9 – 6) = 3 ms
WTE = (12 – 10) = 2 ms
The average waiting time is
(14 + 10 + 0 + 3 + 2)/5 = 29/5 = 5.8 ms
0
B C D
4 9 12
A
3
A
0
B C D
4 9 12 14
E
22
A
3
B
17
23. *Property of STI J0024
Priority Scheduling
TAA = 22 – 0 = 22 ms
TAB = 17 - 3 = 14 ms
TAC = 9 - 4 = 5 ms
TAD = 12 - 6 = 6 ms
TAE = 14 - 10 = 4 ms
The average turnaround time is
(22 + 14 + 5 + 6 + 4)/5 = 51/5 = 10.2 ms
24. *Property of STI J0024
Multilevel Feedback Queues
Q0All processes enter
the queuing network
at the rear of the
highest priority
queue
Processes that
finish executing or
request for an I/O
operation within the
given time slice
leave the queuing
network
FCFS (time slice = 10 ms)
Q1
FCFS (time slice = 20 ms)
Processes that do not finish executing
within the given time slice move to the next
lower-priority queue
Processes that
finish executing or
request for an I/O
operation within the
given time slice
leave the queuing
network
.
.
.
Qn
RR
Processes that do not finish executing
within the given time slice move to the next
lower-priority queue
Q2
FCFS (time slice = 30 ms)
Processes that
finish executing or
request for an I/O
operation within the
given time slice
leave the queuing
network
Processes that
finish executing or
request for an I/O
operation within the
given time slice
leave the queuing
network