Group 3: Process Management in Operating Systems
Questions
What is a process in the context of an operating system?
List the seven process states in a process transition diagram and briefly describe each.
What is the role of the process control block (PCB) in process management?
Compare long-term, short-term, and medium-term schedulers in an operating system.
Explain the difference between multi-programming and time-sharing systems
Answers
Answer: A process is a program in execution, including its code, data, and system resources like memory and CPU time.
Description: A process represents an active task, such as running a web browser. It includes the program code, current state, and resources, managed by the OS to ensure smooth execution.Answer: The seven states are:
New: Process is being created.
Ready: Process awaits CPU allocation.
Running: Process is executing on CPU.
Waiting: Process awaits an Seventeen (e.g., I/O).
Blocked: Process is paused, waiting for resources.
Suspended: Process is temporarily halted.
Terminated: Process has completed or been stopped.
Description: These states track a processβs lifecycle. For example, a process moves from Ready to Running when the CPU is assigned, as seen in task managers like Windows Task Manager.
Image Placeholder: [Insert seven-state process transition diagram]
Answer: The PCB stores process metadata, including process ID, state, priority, CPU registers, and memory allocation.
Description: The PCB is a data structure used by the OS to manage processes. It enables context switching by saving and restoring process states, ensuring seamless multitasking.Answer:
Long-term scheduler: Decides which processes enter the ready queue (controls degree of multi-programming).
Short-term scheduler: Allocates CPU to ready processes (frequent, fast).
Medium-term scheduler: Manages swapping of processes between memory and disk.
Description: Long-term schedulers balance system load, short-term schedulers optimize CPU usage, and medium-term schedulers handle memory constraints, as seen in Linuxβs scheduling mechanisms.
Answer: Multi-programming allows multiple processes to reside in memory and execute concurrently, while time-sharing allocates CPU time slices to multiple users for interactive use.
Description: Multi-programming maximizes CPU utilization (e.g., batch processing in early mainframes), while time-sharing supports multiple users simultaneously (e.g., UNIX terminals), enhancing responsiveness.