0% found this document useful (0 votes)
15 views

Module 2 Notes (1)

The document discusses the concept of processes in operating systems, detailing their components such as the Process Control Block (PCB), stack, heap, and data section. It covers various uniprocessor scheduling algorithms, including FCFS, SJF, and Round Robin, as well as the differences between processes and threads. Additionally, it includes a question bank for further understanding of the topics presented.

Uploaded by

rogmagnusff
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)
15 views

Module 2 Notes (1)

The document discusses the concept of processes in operating systems, detailing their components such as the Process Control Block (PCB), stack, heap, and data section. It covers various uniprocessor scheduling algorithms, including FCFS, SJF, and Round Robin, as well as the differences between processes and threads. Additionally, it includes a question bank for further understanding of the topics presented.

Uploaded by

rogmagnusff
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/ 68

MODULE 2

Process and Process Scheduling


Dr. Shreya Patankar
Process and Process Scheduling
❑ Concept of a Process,
❑ Process States,
❑ Process Description,
❑ Process Control Block.
❑ Uniprocessor Scheduling
❑ Types: Preemptive and Non-preemptive
❑ scheduling algorithms (FCFS, SJF,SRTN, Priority, RR)
❑ Threads: Definition and Types,
❑ Concept of Multithreading
Process
In the context of an Operating System (OS), a process is an instance of a program in
execution. It represents a program that is running and actively using system resources
like the CPU, memory, and I/O devices.

Components of a Process
A process consists of:

❑ Program Code (Text Section): The instructions being executed.


❑ Process Control Block (PCB): A data structure used by the OS to store
information about the process (e.g., process state, ID, CPU registers, memory
usage, etc.).
❑ Stack: Stores temporary data like function parameters, return addresses, and
local variables.
❑ Heap: Dynamic memory used during the execution of the program.
❑ Data Section: Global variables and static variables.
Components of Process
Components of Process
Process life cycle
Process life cycle
Process life cycle
Process life cycle
Process Control Block
Process Control Block
Process Control Block
Process Control Block
Process Control Block
Process Control Block
Uniprocessor Scheduling
Uniprocessor Scheduling
Uniprocessor Scheduling
Uniprocessor Scheduling
Uniprocessor Scheduling
Uniprocessor Scheduling
Need for CPU Scheduling
Need for CPU Scheduling
Need for CPU Scheduling
Need for CPU Scheduling
Need for CPU Scheduling
Uniprocessor Scheduling
Uniprocessor Scheduling
FCFS Scheduling
FCFS Scheduling
FCFS Scheduling
FCFS Scheduling
FCFS Scheduling
SJF Non Premptive Scheduling
SJF Non Premptive Scheduling
SJF Non Premptive Scheduling
SJF Non Premptive Scheduling
SJF Premptive Scheduling
SJF Premptive Scheduling (SRTF)
SJF Premptive Scheduling(SRTF)
SJF Premptive Scheduling(SRTF)
SJF Premptive Scheduling(SRTF)
Priority Premptive Scheduling
Priority Premptive Scheduling
Consider the set of 5 processes whose arrival time and burst time are
given below-
Priority Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Round Robin Premptive Scheduling
Thread
Thread
User Level Thread
Kernel Level Thread
Thread Vs Process
Process Thread
Thread is a segment of a process or a
A process is an instance of a program that
lightweight process that is managed by the
is being executed or processed.
scheduler independently.

Processes are independent of each other


Threads are interdependent and share
and hence don't share a memory or other
memory.
resources.

The operating system takes more time to Threads can be terminated in very little
terminate a process. time.

If one process gets blocked by the If any user-level thread gets blocked, all of
operating system, then the other process its peer threads also get blocked because
can continue the execution. OS takes all of them as a single process.

Context switching between two processes


Context switching between the threads is
takes much time as they are heavy
fast because they are very lightweight.
compared to thread.

Threads share data segment and code


The data segment and code segment of
segment with their peer threads; hence are
each process are independent of the other.
the same for other threads also.
Thread and MultiThreading
Thread and MultiThreading
Thread and MultiThreading
Thread and MultiThreading
Thread and MultiThreading
Question Bank

1 What is a Process and What are the components of a process

2 Explain PCB with a neat diagram

3. Draw and Explain Process life cycle

4. Differentiate between Preemptive and Non Preemptive scheduling

5 State the need for Uniprocessor scheduling

6. Differentiate between threads and Process

7 Exaplin Multi threading and its types

8 Study FCFS non preemptive and SJF non pre emptive scheduling algorithms with its
advantages and disadvantages. Solve Problems on FCFS non pre emptive and SJF non pre
emptive scheduling algorithms
9 Study SRTF, Round Robin and Priority preemptive scheduling algorithms with its
advantages and disadvantages. Solve Problems on SRTF pre emptive, Round Robin and
Priority pre emptive scheduling algorithms.

You might also like