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

Understanding Processes and Scheduling

The document provides an overview of processes and CPU scheduling, defining a process as an executing instance of a program with various states and memory sections. It discusses key concepts such as context switching and multitasking, as well as various CPU scheduling algorithms like FCFS, SJN, and Round Robin, highlighting their applications and metrics for evaluation. The key takeaway emphasizes the importance of CPU scheduling in enhancing efficiency and fairness across different applications.

Uploaded by

bis22-pjimu
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 views12 pages

Understanding Processes and Scheduling

The document provides an overview of processes and CPU scheduling, defining a process as an executing instance of a program with various states and memory sections. It discusses key concepts such as context switching and multitasking, as well as various CPU scheduling algorithms like FCFS, SJN, and Round Robin, highlighting their applications and metrics for evaluation. The key takeaway emphasizes the importance of CPU scheduling in enhancing efficiency and fairness across different applications.

Uploaded by

bis22-pjimu
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/ 12

Understandin

g Processes &
CPU
Key Concepts and Scheduling Algorithms

Scheduling
STA

Prince Jimu – BIS/22/SS/009


What is a Process?
Definition: A process is an executing instance of a program.
Components: Process counter, resources, memory sections.
Process Lifecycle
A process has the following states:
- New: The process is created.
- Ready: The process is waiting for CPU allocation.
- Running: The process is currently executing.
- Waiting: The process is paused, waiting for an event
(e.g., I/O completion).
- Terminated: The process has finished execution.
Memory Sections of Process
Each process has 4 main different memory sections:
- Text: Holds the executable code (static).
- Data: Stores global variables (static).
- Stack: Stores function parameters, return addresses,
and local variables (dynamic).
- Heap: Dynamically allocated memory during execution.
Key Concepts
Context Switching: Saving and restoring process states.

Multitasking: Running multiple processes


simultaneously.

Process Control Block (PCB): Stores process ID, state,


CPU registers, memory details.
Applications of Process Management

Process management helps in efficient resource


utilization and used in practical situations such as:

Operating Systems: Running multiple applications


concurrently.
Web Servers: Handling multiple client requests.
Smartphones: Running GPS, messaging, music in the
background.
CPU Scheduling algorithms

These are algorithms used to determine which process


should be executed and to allocate CPU time to it. They
include:

First Come First Serve


Round Robin
Priority Scheduling
Shortest Job Next
Multi-Level Feedback Queue
CPU Scheduling algorithms cont..

First Come First Serve (FCFS):


- Simple but causes long waiting times.
- Best for batch processing.

Shortest Job Next (SJN):


- Minimizes waiting time.
- Requires execution time knowledge
CPU Scheduling algorithms cont..

Round Robin (RR):


- Fair CPU time distribution.
- Best for time-sharing systems.

Priority Scheduling:
- Executes critical tasks first.
- Risk of starvation for lower-priority tasks
Key Scheduling Metrics

Throughput: Completed processes per unit time.

Turnaround Time: Total time from process submission to


completion.

Waiting Time: Time in the ready queue.

Response Time: Time until first execution.


Key Takeaways

CPU scheduling improves efficiency and fairness in


process execution.

Different scheduling strategies suit different applications


and there is no perfect algorithm for each application.

Real-world importance: Gaming, life-support, servers, and


multitasking OS.
The End

You might also like