Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 6 CPU Scheduling Silberschatz - Operating System Concepts 9th…
Chapter 6
CPU Scheduling
Silberschatz - Operating System Concepts 9th
Basic Concepts
CPU Scheduler
The scheduler selects a process from the processes in memory that are ready to execute and allocates the CPU to that process
Preemptive Scheduling
When a process switches from the running state to the waiting state
When a process switches from the running state to the ready state
When a process switches from the waiting state to the ready state
When a process terminates
CPU-I/O burst Cycle
Process execution consists of a cycle of CPU execution and I/O wait
Dispatcher
Switching content
Switching to user mode
Jumping to the proper location in the user program to restart that program
Scheduling Criteria
Turnaround time
The interval from the time of submission of a process to the time of completion
Waiting time
The sum of the periods spent waiting in the ready queue
Throughput
The number of processes that are completed per time
Response time
The time from the submission of a request until the first response is produced
CPU Utilization
we want to keep the CPU usage as busy as possible
Scheduling Algorithms
Priority Scheduling
A priority is associated with each process, and the CPU is allocated to the process with the highest priority
Round-Robin Scheduling
The CPU scheduler goes around the ready queue, allocating the CPU to each process for a time interval of up to 1 time quantum (slice)
Shortest-Job-First Scheduling
When the CPU is available, it is assigned to the process that has the smallest next CPU burst
Multilevel queue Scheduling
Partitions the ready queue into several separate queues. Each queue has its own scheduling algorithm
System processes
Interactive processes
Batch processes
User processes
First-Come, First-Served Scheduling
The process that requests the CPU first is allocated the CPU first
Multilevel Feedback Queue Scheduling
Allows a process to move between queues
4.Thread Scheduling
Contention Scope
The thread library schedules user-level threads to run on an available LWP
Pthread Scheduling
PTHREAD_SCOPE_PROCESS: Schedules threads using PCS scheduling
PTHREAD_SCOPE_SYSTEM: schedules threads using SCS scheduling
Real-Time CPU Scheduling
Rate-Monotonic Scheduling
Earliest-Deadline-First Scheduling
Priority based scheduling
Proportional Share Scheduling
Minimizing latency
Dispatch latency
Interrupt latency
Period of time from the arrival of an interrupt at the CPU to the start of the routine that services the interrupt
Event latency: amount of time that elapses from when an event occurs to when it is serviced
POSIX Real-Time Scheduling
Multiple-Processor Scheduling
Processor affinity
When an operating system has a policy of attempting to keep a process running on the same processor
Load Balancing
Attempts to keep the workload evenly distributed across all processors in an SMP system
Asymmetric multiprocessing
All scheduling decisions, I/O processing, and other system activities handled by a single processor
Multicore processors
Each core maintains its architectural state and thus appears to the operating system to be a separate physical processor
Daniela Porras Quiros
2015071255