0% found this document useful (0 votes)
6 views10 pages

CPU Scheduling

Uploaded by

Nilkant Gorle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views10 pages

CPU Scheduling

Uploaded by

Nilkant Gorle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

CPU

SCHEDULING
Presented by Nilkant Gorle
OVERVIEW
1 Introductio
2 n
Process and scheduling
3 Threads, Scheduling
4 Criteria
Scheduling
Algorithms
5 Multiprocessor scheduling
INTRODUCTION
The Bourne shell, or sh, was the default Unix shell of Unix Version 7. It was developed by
Stephen Bourne, of AT&T BellLaboratories. A Unix shell, also called "the command line",
provides the traditional user interface forthe Unix operating system and for Unix-like
systems. Users direct the operation of the computer by entering command input as text for
a shell to execute. There are many different shells in use. They are Bourne shell (sh) ,C
shell (csh) , Korn shell (ksh) Bourne Again shell(bash) When we issue a command the shell
is the first agency to acquire the information. It accepts and interprets user requests. The
shell examines &rebuilds the commands &leaves the execution work to kernel. The kernel
handles the h/w on behalf ofthesecommands &all processes in the system. The shell is
generally sleeping. It wakes up when an input is keyed in at the prompt. Thisinput is
actually input to the program that represents the shell.
PROCESS AND SCHEDULING
Process concepts and scheduling, Operations on processes,
Cooperating Processes, Threads, Scheduling Criteria, Scheduling
Algorithms, Multiple -Processor Scheduling. The shell has similarities to
the DOS command processor Command.com (actually Dos was design
as a poor copy of UNIX shell), it's actually much more powerful, really
a programming language in its own right.
A shell is a program that acts as the interface between you and the
UNIX system, allowing you to enter commands for the operating
system to execute.
Burst
cycles
In CPU scheduling, burst cycles refer to the alternating phases in a
process’s execution between using the CPU (CPU burst) and
performing I/O operations (I/O burst). Understanding burst cycles
is crucial for designing and implementing efficient scheduling
algorithms, as these cycles affect CPU utilization, process response
times, and overall system performance.
CPU Burst: This is a period where a process is actively using the
CPU for computations. CPU bursts are times when the CPU is
"busy" executing instructions from a process.
I/O Burst: After a CPU burst, a process typically needs to perform
input/output (I/O) operations, such as reading from disk or waiting
for network data. During I/O bursts, the process waits and
releases the CPU so it can be assigned to other processes.
Cycle Alternation: A process alternates between these CPU and
I/O bursts throughout its lifecycle. This alternating pattern of CPU
and I/O bursts is what we refer to as burst cycles.
Preemptive Non-Preemptive
Feature
Scheduling Scheduling

Processes can be Processes cannot be


Interruptions
interrupted interrupted

Faster response for high- Slower response due to no


Response Time
priority tasks preemption

Context Switching Higher (due to frequent


Lower (fewer switches)
Overhead switches)

Long tasks can delay


Fairness Fairer for shorter tasks
shorter ones

More complex to manage Simpler, as processes run to


Complexity
interruptions completion

Round Robin, SRTF, Priority FCFS, SJN, Priority (Non-


Example Algorithms
(Preemptive) Preemptive)
THREADS AND CPU
SCHEDULING
In modern operating systems, processes are broken down into
smaller units called threads, which allow for concurrent
execution within a process. Threads can share process
resources like memory, while independently executing tasks.
Multithreading allows multiple threads to run in parallel within
a single process, improving application performance and
responsiveness.
Types of
1.User-Level Threads:
Threads
Managed by the application, not the operating system.
Faster to create and manage but cannot use multiple CPU cores efficiently.
Scheduling is handled by the application, so the OS is unaware of the user-level
threads.
2.Kernel-Level Threads:
Managed directly by the operating system, allowing threads to be scheduled on
multiple CPU cores.
Slightly slower to create and manage compared to user-level threads but allows
true parallelism on multicore systems.
3.Multithreading Models:
Many-to-One: Multiple user threads mapped to a single kernel thread (limits
concurrency).
One-to-One: Each user thread maps to a single kernel thread, allowing high
concurrency.
4.Many-to-Many:
Maps multiple user threads to multiple kernel threads, balancing efficiency and
concurrency.
Scheduling Algorithms and Their Impact on Scheduling
Criteria
Each scheduling algorithm uses a different approach to manage CPU resources,
and each one impacts the scheduling criteria differently.

You might also like