Process Management Reviewer
Process Management Reviewer
In modern computing, efficient process management is crucial for ensuring system stability,
performance, and resource allocation. Process management involves handling the execution of
programs, managing CPU scheduling, synchronizing processes, and preventing deadlocks. The
operating system plays a vital role in overseeing these functions to ensure smooth operation.
This report explores the fundamentals of process management, including processes, threads,
and various scheduling algorithms that optimize system performance.
- CPU Scheduling
The OS ensures efficient execution of multiple processes by managing CPU time in
a multiprogramming system.
- Process Synchronization
The OS ensures multiple processes work together correctly without data corruption
or race conditions.
- Deadlock Handling
The OS detects and resolves situations where processes are stuck waiting for each
other indefinitely.
CPU Scheduling
- CPU scheduling is a process used by the operating system to decide which task or
process gets to use the CPU at a particular time.
- Maximize the CPU utilization.
- Minimize the response and waiting time of the process.
Arrival Time: The time at which the process arrives in the ready queue.
Completion Time: The time at which the process completes its execution.
Burst Time: Time required by a process for CPU execution.
Turn Around Time: Time Difference between completion time and arrival time.
Turn Around Time = Completion Time – Arrival Time
Waiting Time(W.T): Time Difference between turn around time and burst time.
Waiting Time = Turn Around Time – Burst Time
Preemptive Scheduling:
- Preemptive scheduling is used when a process switches from running state to ready
state or from the waiting state to the ready state.
Non-Preemptive Scheduling:
- Non-Preemptive scheduling is used when a process terminates , or when a process
switches from running state to waiting state.
CPU Scheduling Algorithms
FCFS – First Come, First Serve
SJF – Shortest Job First
SRTF – Shortest Remaining Time First
Round Robin
Priority Scheduling
HRRN – Highest Response Ratio Next
Multiple Queue Scheduling
Multilevel Feedback Queue Scheduling
Priority Scheduling
- Priority scheduling is a non-preemptive algorithm and one of the most common
scheduling algorithms in batch systems.
- Each process is assigned a priority. Process with highest priority is to be executed first
and so on.
- Processes with same priority are executed on first come first served basis.
- Priority can be decided based on memory requirements, time requirements or any other
resource requirement.
b) A program in execution
c) A hardware component
d) A type of CPU scheduling algorithm
a) SJF
b) FCFS
c) Round Robin
d) Priority Scheduling
8. Which scheduling algorithm gives the CPU to the process with the shortest execution time?
a) FCFS
b) SJF
c) Priority Scheduling
d) Round Robin
9. The operating system is responsible for process creation and termination. (True)
10. Round Robin scheduling is a non-preemptive scheduling algorithm. (False)
11. Preemptive scheduling allows a process to be interrupted and moved to a ready state.
(True)
12. SJF scheduling always ensures the lowest average waiting time. (False, only in ideal
cases)
13. In priority scheduling, processes with the lowest priority execute first. (False)
14. Deadlock occurs when processes wait indefinitely for resources held by others. (True)
15. IPC methods include message passing and shared memory. (True)
Arrival Time: The time at which a process arrives in the ready queue.
Burst Time: The time required by a process for CPU execution.
Turnaround Time: The difference between completion time and arrival time. Formula:
Turnaround Time = Completion Time – Arrival Time.
Waiting Time: The difference between turnaround time and burst time. Formula:
Waiting Time = Turnaround Time – Burst Time.
17. Explain the difference between preemptive and non-preemptive scheduling. Answer:
Preemptive Scheduling: Allows the operating system to interrupt a running process and
move it back to the ready state to allocate CPU time to another process.
Non-Preemptive Scheduling: Once a process starts execution, it runs until it either
completes or moves to a waiting state. The CPU is not taken away until the process is
finished.
18. Given the following processes with arrival time and burst time, calculate Turnaround
Time (TAT) and Waiting Time (WT) using the FCFS scheduling algorithm.
Solution:
Final Answer:
19. Discuss the importance of process synchronization and deadlock handling in modern
operating systems. Answer:
Process Synchronization:
o Ensures multiple processes work together without conflicts.
o Prevents data inconsistency caused by race conditions.
o Used in multi-threaded applications for efficient execution.
Deadlock Handling:
o Occurs when two or more processes wait indefinitely for resources held by each
other.
o The OS detects and resolves deadlocks using techniques like resource allocation
graphs and prevention strategies.
o Proper handling improves system efficiency and stability.