This document discusses different approaches to CPU scheduling. It describes three levels of scheduling: long-term, medium-term, and short-term. For short-term scheduling, which determines the next ready process to execute, it covers scheduling algorithms like first-come first-served (FCFS), shortest job first (SJF), shortest remaining time (SRT), and round-robin. It analyzes the advantages and disadvantages of each approach with respect to criteria like CPU utilization, waiting time, response time, and turnaround time.
CPU Scheduling is a process of determining which process will own CPU for execution while another process is on hold. The main task of CPU scheduling is to make sure that whenever the CPU remains idle, the OS at least select one of the processes available in the ready queue for execution.
CPU Scheduling is a process of determining which process will own CPU for execution while another process is on hold. The main task of CPU scheduling is to make sure that whenever the CPU remains idle, the OS at least select one of the processes available in the ready queue for execution.
It consists of CPU scheduling algorithms, examples, scheduling problems, realtime scheduling algorithms and issues. Multiprocessing and multicore scheduling.
Operating system 28 fundamental of schedulingVaibhav Khanna
The objective of multiprogramming is to have some process running at all times to maximize CPU utilization.
The objective of time-sharing system is to switch the CPU among processes so frequently that users can interact with each program while it is running.
For a uniprocessor system, there will never be more than one running process.
If there are more processes, the rest will have to wait until the CPU is free and can be rescheduled
In computing, scheduling is the action .nathansel1
In computing, scheduling is the action of assigning resources to perform tasks. The resources may be processors, network links or expansion cards. The tasks may be threads, processes or data flows. The scheduling activity is carried out by a process called scheduler.
CPU scheduling is the basis of multiprogrammed operating systems. By switching the CPU among processes, the operating system can make the computer more productive
- To introduce CPU scheduling, which is the basis for multiprogrammed operating systems
- To describe various CPU-scheduling algorithms
- To discuss evaluation criteria for selecting a CPU-scheduling algorithm for a particular system
- To examine the scheduling algorithms of several operating systems
The objectives of these slides are -
- To introduce the notion of a process - a program in execution, which forms the basis of all computation
- To describe the various features of processes, including scheduling, creation and termination, and communication
- To explore interprocess communication using shared memory and message passing
Uniprocessor SchedulingCsci 430, Spring 2018Texas A&corbing9ttj
Uniprocessor
Scheduling
Csci 430, Spring 2018
Texas A&M University – Commerce
Derek Harter
Introduction
to Operating
System
Concepts
Types of Processor
Scheduling
Objective: Be able to explain the
differences between long-, medium- and
short-term scheduling policies.
Processor Scheduling
Aim is to assign processes to be executed by
the processor in a way that meets system
objectives, such as response time, throughput,
and processor efficiency
Broken down into three separate functions:
– Long-term
– Medium-term
– Short-term
Table 9.1
Types of Scheduling
Scheduling and Process State
Transitions
Figure 9.2
Nesting of
Scheduling
Functions
(Referencing figure 3.9b)
Queuing
Diagram
Long-Term Scheduler
Determines which programs are admitted to the system for
processing
Controls the degree of multiprogramming
the more processes that are created, the smaller the
percentage of time that each process can be executed
may limit to provide satisfactory service to the current set
of processes
Medium-Term
Scheduling
Part of the swapping function
Swapping-in decisions are based on the need
to manage the degree of
multiprogramming
considers the memory requirements of the
swapped-out processes
Short-Term Scheduling
Known as the dispatcher
Executes most frequently
Makes the fine-grained decision of which process to
execute next
Invoked when an event occurs that may lead to the
blocking of the current process or that may provide an
opportunity to preempt a currently running process in favor
of another
Scheduling Algorithms
Objective: Be able to assess the
performance of different scheduling policies
(for the short term scheduler or dispatcher).
Short Term Scheduling
Criteria
Main objective is to allocate
processor time to optimize certain
aspects of system behavior
A set of criteria is needed to
evaluate the scheduling policy
– User vs. system oriented
criteria
Short-Term Scheduling
Criteria: Performance
- Performance related criteria are quantative (can be measured)
- Examples: response time and throughput
- Not performance related are qualitative or not readily measured
- Predictability
Table 9.2
Scheduling
Criteria
Priority
Queuing
Alternative Scheduling
Policies
Selection Function
Determines which process, among ready processes, is selected
next for execution
May be based on priority, resource requirements, or the execution
characteristics of the process
If based on execution characteristics then important quantities
are:
w = time spent in system so far, waiting
e = time spent in execution so far
s = total service time required by the process, including e;
generally, this quantity must be estimated or supplied by the
user
Decision Mode
Specifies the
instants in time
at which the
selection
function is
exercised
Two
categories:
Nonpreemptive
Preemptive
N ...
It consists of CPU scheduling algorithms, examples, scheduling problems, realtime scheduling algorithms and issues. Multiprocessing and multicore scheduling.
Operating system 28 fundamental of schedulingVaibhav Khanna
The objective of multiprogramming is to have some process running at all times to maximize CPU utilization.
The objective of time-sharing system is to switch the CPU among processes so frequently that users can interact with each program while it is running.
For a uniprocessor system, there will never be more than one running process.
If there are more processes, the rest will have to wait until the CPU is free and can be rescheduled
In computing, scheduling is the action .nathansel1
In computing, scheduling is the action of assigning resources to perform tasks. The resources may be processors, network links or expansion cards. The tasks may be threads, processes or data flows. The scheduling activity is carried out by a process called scheduler.
CPU scheduling is the basis of multiprogrammed operating systems. By switching the CPU among processes, the operating system can make the computer more productive
- To introduce CPU scheduling, which is the basis for multiprogrammed operating systems
- To describe various CPU-scheduling algorithms
- To discuss evaluation criteria for selecting a CPU-scheduling algorithm for a particular system
- To examine the scheduling algorithms of several operating systems
The objectives of these slides are -
- To introduce the notion of a process - a program in execution, which forms the basis of all computation
- To describe the various features of processes, including scheduling, creation and termination, and communication
- To explore interprocess communication using shared memory and message passing
Uniprocessor SchedulingCsci 430, Spring 2018Texas A&corbing9ttj
Uniprocessor
Scheduling
Csci 430, Spring 2018
Texas A&M University – Commerce
Derek Harter
Introduction
to Operating
System
Concepts
Types of Processor
Scheduling
Objective: Be able to explain the
differences between long-, medium- and
short-term scheduling policies.
Processor Scheduling
Aim is to assign processes to be executed by
the processor in a way that meets system
objectives, such as response time, throughput,
and processor efficiency
Broken down into three separate functions:
– Long-term
– Medium-term
– Short-term
Table 9.1
Types of Scheduling
Scheduling and Process State
Transitions
Figure 9.2
Nesting of
Scheduling
Functions
(Referencing figure 3.9b)
Queuing
Diagram
Long-Term Scheduler
Determines which programs are admitted to the system for
processing
Controls the degree of multiprogramming
the more processes that are created, the smaller the
percentage of time that each process can be executed
may limit to provide satisfactory service to the current set
of processes
Medium-Term
Scheduling
Part of the swapping function
Swapping-in decisions are based on the need
to manage the degree of
multiprogramming
considers the memory requirements of the
swapped-out processes
Short-Term Scheduling
Known as the dispatcher
Executes most frequently
Makes the fine-grained decision of which process to
execute next
Invoked when an event occurs that may lead to the
blocking of the current process or that may provide an
opportunity to preempt a currently running process in favor
of another
Scheduling Algorithms
Objective: Be able to assess the
performance of different scheduling policies
(for the short term scheduler or dispatcher).
Short Term Scheduling
Criteria
Main objective is to allocate
processor time to optimize certain
aspects of system behavior
A set of criteria is needed to
evaluate the scheduling policy
– User vs. system oriented
criteria
Short-Term Scheduling
Criteria: Performance
- Performance related criteria are quantative (can be measured)
- Examples: response time and throughput
- Not performance related are qualitative or not readily measured
- Predictability
Table 9.2
Scheduling
Criteria
Priority
Queuing
Alternative Scheduling
Policies
Selection Function
Determines which process, among ready processes, is selected
next for execution
May be based on priority, resource requirements, or the execution
characteristics of the process
If based on execution characteristics then important quantities
are:
w = time spent in system so far, waiting
e = time spent in execution so far
s = total service time required by the process, including e;
generally, this quantity must be estimated or supplied by the
user
Decision Mode
Specifies the
instants in time
at which the
selection
function is
exercised
Two
categories:
Nonpreemptive
Preemptive
N ...
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
2. 2
Classification of Scheduling Activity
Long-term: which process to admit
Medium-term: which process to swap in or out
Short-term: which ready process to execute next
3. 3
Long-Term Scheduling
Determines which programs are admitted
to the system for processing
Controls the degree of multiprogramming
If more processes are admitted
• less likely that all processes will be blocked
• better CPU usage
• each process has smaller fraction of the CPU
The long term scheduler may attempt to
keep a mix of processor-bound and I/O-
bound processes
4. 4
Medium-Term Scheduling
Swapping decisions based on the need to
manage multiprogramming
• Allows the long-term scheduler to admit more
processes than actually fit in memory
• but too many processes can increase disk
activity (paging), so there is some “optimum”
level of multiprogramming.
Done by memory management software
(chapter 8)
5. 5
Short-Term Scheduling
Determines which process is going to execute
next (also called CPU scheduling)
the focus of this chapter..
invoked on a event that may lead to choosing
another process for execution:
• clock interrupts
• I/O interrupts
• operating system calls and traps, including I/O
• signals
6. 6
The CPU-I/O Cycle
Silberschatz, Galvin, and Gagne 1999
“CPU-bound”
processes require
more CPU time than
I/O time
“I/O-bound”
processes spend
most of their time
waiting for I/O.
8. 8
Our focus
Uniprocessor Scheduling: scheduling a
single CPU among all the processes in the
system
Key Criteria:
• Maximize CPU utilization
• Maximize throughput
• Minimize waiting times
• Minimize response time
• Minimize turnaround time
9. 9
Criteria
Maximize CPU utilization
• Efficiency
• Need to keep the CPU busy
Minimize waiting times
• Time spent waiting in READY queue
• Each process should get a fair share of the
CPU
10. 10
Criteria
Maximize throughput
• Process completions per time unit
Minimize response time
• From a user request to the first response
• I/O bound processes
Minimize turnaround time
• CPU-bound process equivalent of response
time
• Elapsed time to complete a process
11. 11
User vs. System Scheduling Criteria
User-oriented
Turnaround Time (batch systems): Elapsed time
from the submission of a process to its
completion
Response Time (interactive systems): Elapsed
time from the submission of a request to the first
response
System-oriented
CPU utilization
fairness
throughput: processes completed per unit time
12. 12
Two Components of Scheduling Policies
Selection function
which process in the ready queue is selected next
for execution?
Decision mode
at what times is the selection function exercised?
• Nonpreemptive
A process in the running state runs until it blocks or
ends
• Preemptive
Currently running process may be interrupted and
moved to the Ready state by the OS
Prevents any one process from monopolizing the
CPU
13. 13
Policy vs. Mechanism
Important in scheduling and resource
allocation algorithms
Policy
• What is to be done
Mechanism
• How to do it
Policy: All users equal access
Mechanism: round robin scheduling
Policy: Paid jobs get higher priority
Mechanism: Preemptive scheduling
algorithm
14. 14
A running example to discuss various
scheduling policies
Process
Arrival
Time
Burst
Time
1
2
3
4
5
0
2
4
6
8
3
6
4
5
2
15. 15
First Come First Served (FCFS)
Selection function: the process that has
been waiting the longest in the ready
queue (hence, FCFS, FIFO queue)
Decision mode: nonpreemptive
• a process runs until it blocks itself (I/O or other)
16. 16
FCFS Drawbacks
Favors CPU-bound processes
• A process that does not perform any I/O will
monopolize the processor!
• I/O-bound processes have to wait until CPU-
bound process completes
• They may have to wait even when their I/Os
have completed
poor device utilization
• We could reduce the average wait time by
giving more priority to I/O bound processes
17. 17
Shortest Job First (SJF)
Selection function: the process with the shortest
expected CPU burst time
Decision mode: non-preemptive
I/O bound processes will be picked first
We need to estimate the expected CPU burst time
for each process: on the basis of past behavior.
Shortest job
First (SJF)
18. 18
Estimating the Required CPU Burst
Can average all past history equally
But recent history of a process is more likely
to reflect future behavior
A common technique for that is to use
exponential averaging
• S[n+1] = a T[n] + (1-a) S[n] ; 0 < a < 1
• Puts more weight on recent instances
whenever a > 1/n
20. 20
Exponential Averaging
Set S[1] = 0 to give new processes high priority.
Exponential averaging tracks changes in process
behavior much faster than simple averaging.
21. 21
Shortest Job First: Critique
SJF implicitly incorporates priorities: shortest
jobs are given preference.
• Typically these are I/O bound jobs
Longer processes can starve if there is a
steady supply of shorter processes
Lack of preemption not suitable in a time
sharing environment
• CPU bound process gets lower priority
• But a process doing no I/O at all could
monopolize the CPU if it is the first one in the
system
22. 22
Shortest Remaining Time (SRT) =
Preemptive SJF
If a process arrives in the Ready queue
with estimated CPU burst less than
remaining time of the currently running
process, preempt.
Prevents long jobs from dominating.
• But must keep track of remaining burst
times
Better turnaround time than SJF
• Short jobs get immediate preference
23. 23
Selection function: same as FCFS
Decision mode: Preemptive
• Maximum time slice (typically 10 - 100 ms)
enforced by timer interrupt
• running process is put at the tail of the ready
queue
Round-Robin
24. 24
Time Quantum for Round Robin
must be substantially larger than process switch time
should be larger than the typical CPU burst
If too large, degenerates to FCFS
Too small, excessive context switches (overhead)
25. 25
Fairness vs. Efficiency
Each context switch has the OS using the
CPU instead of the user process
• give up CPU, save all info, reload w/ status of
incoming process
• Say 20 ms quantum length, 5 ms context switch
• Waste of resources
20% of CPU time (5/20) for context switch
• If 500 ms quantum, better use of resources
1% of CPU time (5/500) for context switch
Bad if lots of users in system – interactive users
waiting for CPU
• Balance found depends on job mix
26. 26
Round Robin: Critique
Still favors CPU-bound processes
• An I/O bound process uses the CPU for a time less than
the time quantum and then is blocked waiting for I/O
• A CPU-bound process runs for its whole time slice and
goes back into the ready queue (in front of the blocked
processes)
One solution: virtual round robin (VRR, not in
book…)
• When a I/O has completed, the blocked process is
moved to an auxiliary queue which gets preference over
the main ready queue
• A process dispatched from the auxiliary queue gets a
shorter time quantum (what is “left over” from its
quantum when it was last selected from the ready
queue)