Process Management in Operating System, Study notes of Operating Systems

This document includes process management topic from subject - operating system. The topic - Process Management includes - Process Management: Definition, States, Scheduling, Operations, Threads and Their Types

Typology: Study notes

2025/2026

Available from 05/07/2026

sukhmeen-dhiman
sukhmeen-dhiman 🇮🇳

15 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
BCA-Bachelor of Computer Applications
Process Management: Definition, States, Scheduling,
Operations, Threads and Their Types
1. Process — Definition
A process is a unit of work done by the computer.
It needs certain resources such as:
• CPU time
• Memory
• Files
• I/O devices
A process is an instance of a program in execution.
When a program is loaded into memory and starts running — it becomes a
process.
Example: When we open Chrome, the Chrome program becomes a
process.
2. Process States
A process in an OS passes through multiple states as it begins execution,
waits for resources, gets scheduled, runs, and eventually finishes.
These stages collectively describe the complete lifecycle of a process,
depending on its progress and availability of system resources.
These movements help the OS manage tasks efficiently.
State Diagram: New (admit)Ready (dispatch)Running (release)Exit
Running (event wait)Block/Waiting (event occurs)Ready
— New
• Process has just been created.
— Ready
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Process Management in Operating System and more Study notes Operating Systems in PDF only on Docsity!

BCA-Bachelor of Computer Applications

Process Management: Definition, States, Scheduling,

Operations, Threads and Their Types

1. Process — Definition

A process is a unit of work done by the computer. It needs certain resources such as:

  • CPU time
  • Memory
  • Files
  • I/O devices A process is an instance of a program in execution. When a program is loaded into memory and starts running — it becomes a process. Example : When we open Chrome, the Chrome program becomes a process.

2. Process States

A process in an OS passes through multiple states as it begins execution, waits for resources, gets scheduled, runs, and eventually finishes. These stages collectively describe the complete lifecycle of a process , depending on its progress and availability of system resources. These movements help the OS manage tasks efficiently. State Diagram: New (admit)Ready (dispatch)Running (release)Exit Running (event wait)Block/Waiting (event occurs)Ready — New

  • Process has just been created. — Ready
  • Process is loaded into memory and prepared to run as soon as CPU becomes free. — Running
  • CPU is currently executing the process.
  • With a single CPU system, only 1 process can be in this state at a time. — Block / Waiting
  • Process cannot continue execution because it is waiting for an event like I/O. — Exit / Termination
  • Process has completed its execution and the OS removes it from memory. Quick Summary: New — Program is started | Ready — Loaded into memory | Running — CPU executes Block — Waiting for I/O | Exit — Program ends Real Example: Click icon New state | Load to main memory Ready | Editing Running | Print command Block/Waiting

3. Process Scheduling

Process scheduling is the activity of the process manager that handles the removal of a running process from the CPU and selection of another process based on a particular strategy. Throughout its lifetime, a process moves between various scheduling queues such as ready queue, waiting queue, and devices queue. Scheduling is important in OS with multiprogramming, as multiple processes might be eligible for running at a time. One of the key responsibilities of the OS is to decide which programs will execute on the CPU.

Some Other Schedulers

(1) I/O Schedulers – Manages order of read/write operations. Reduces I/O wait time and improves performance. Schedules I/O requests using algorithms like FCFS. (2) Real-Time Schedulers – Used in systems where tasks must meet deadlines. Ensures timely execution of critical tasks.

Comparison: Long-Term vs Short-Term Scheduler

Long-Term Scheduler Short-Term Scheduler It is a job scheduler It is a CPU scheduler Slowest scheduler Fastest scheduler Controls degree of multiprogramming Gives less control over degree Barely present in time-sharing systems essential for all systems Selects processes from job pool Ready processes for execution loads them by CPU

4. Operations on Processes

Process operations refer to actions or activities performed on processes in an OS. These operations include: They are crucial for managing and controlling execution of programs in the OS. Operations on processes are fundamental to the functioning of the OS, enabling effective flow of program execution and resource allocation. Each operation plays a vital role in ensuring that processes are efficiently managed, allowing for multitasking and optimal resource utilization.

(1) Process Creation

A process is created and placed in the ready queue (main memory), where it waits to be executed.

It is the initial step of process execution activity, meaning creating a new process for execution. It might be performed by system / user / old process.

  • When we start the computer, the system creates several background processes.
  • A user may request to create a new process.
  • A process can create a new process itself while executing.

(2) Scheduling / Dispatching

OS selects 1 process from the ready queue to run next. This selection step is called scheduling. Event/activity — state of process is changed from 'ready' to 'run'. OS puts process from ready state into running state. Dispatching is done by OS when resources are free or process has higher priority than ongoing process.

(3) Execution

CPU starts running the chosen process. If process needs to wait for an event or resource, it becomes blocked and CPU switches to another process.

(4) Blocking

When a process invokes an I/O system call that blocks the process, OS puts it in block mode. Block mode — a mode where process waits for I/O.

(5) Termination

Once process completes its task, OS terminates it and clears its context. Activity of ending process — is reclamation of computer resources taken by process for execution. Events that may lead to process termination:

  • Process completes its execution fully and indicates to OS that it has finished.

Example: When we use Google Chrome, you can play games, watch videos, download files, communicate, book tickets etc. Each task runs as a separate thread inside the same browser process.

  • Is the smallest unit of execution within a process.
  • Enables a program to perform multiple tasks concurrently while sharing the same memory and resources.
  • Improves application performance and user responsiveness in multitasking environments.
  • Also moves through states (like a process).
  • Has its own Thread ID (TID) for identification.
  • Threads within the same process share memory and resources, enabling faster communication.
  • Context switching can occur between threads to allow multiple tasks to execute efficiently. A thread is lightweight because it is smaller and faster. It allows multiple tasks to run simultaneously, improving program efficiency. Each thread has its own program counter, register set and stack space. Threads share code, data and OS system resources within the same process.

Why Do We Need Threads?

Needed in modern OS and applications because they provide: (1) Efficient Resource Sharing – Threads share memory and resources of the process. (2) Improved Performance – Multiple tasks run at the same time; programs execute faster. (3) Enable Concurrency – Multiple operations happen simultaneously: handling user input, processing data, saving files. (4) Better CPU Utilization – Can run on different cores, improving overall system performance.

Types of Threads

Based on how they are managed and scheduled in an OS:

  • User-Level Thread (ULT)
  • Kernel-Level Thread (KLT)
  • Hybrid Thread

(1) User-Level Thread (ULT)

  • Managed by user-level thread library.
  • Implemented in user space of main memory.
  • User-level library is used for thread creation and management without any support from kernel.
  • Switching between threads is fast since only program counter, stack and registers need to be saved/restored.
  • Do not require system calls for creation, making them lightweight.
  • If 1 thread makes a blocking system call, all threads are blocked — entire process stops.
  • Scheduling done by application itself — not as efficient as kernel-level scheduling. Example: In a text editor — spell check, auto save etc.

(2) Kernel-Level Thread (KLT)

  • Managed by the OS (kernel).
  • Kernel performs creation and management in kernel space.
  • Used for internal working of the OS.
  • Kernel schedules each thread independently, allowing parallel execution on multiple CPUs.
  • Context switching is slower than ULTs as switching between user mode and kernel mode is required.
  • Implementation is complex as it requires frequent interaction with kernel.
  • Handles blocking system calls efficiently — if 1 thread blocks, kernel can run another thread from the same process. Example: Multiple tabs running in a web browser. If 1 browser tab hangs, other tabs work in KLT.

(3) Hybrid-Level Thread

  • Combination of user and kernel-level threads.
  • Also known as many-to-many threading model.

(5) Stack (LIFO) – Stores function call parameters and return address. Works on LIFO order (Last In First Out).