1/4
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What are the 5 main states in the Linux process life-cycle?
The Linux process life-cycle consists of five main states: 1. New: The state when a process is being created and initialized. 2. Ready: This state indicates that the process is prepared to execute but is currently waiting for CPU time. 3. Running: At this stage, the process is actively executing its instructions on the CPU. 4. Waiting: Here, the process is unable to proceed until a specific event occurs or I/O operations are completed, rendering it blocked. 5. Terminated: Finally, once a process has completed its execution, it enters this state, signifying that it has finished and is no longer active.
Why does a process transition from Running to Ready?
Usually due to an interrupt, such as a time-slice expiration (preemption) or a higher-priority process becoming ready.This transition allows the CPU to allocate resources efficiently by giving time to other processes or responding to higher priority tasks.
Why does a process transition from Running to Waiting?
It occurs when the process requests something it must wait for, such as an I/O request or a synchronization signal (event wait).This transition allows the process to pause its execution until the requested resource becomes available, ensuring efficient CPU utilization.
What is a Process Control Block (PCB)?
A data structure in the OS kernel containing all information about a process (PID, state, program counter, CPU registers, memory limits, open files).
What happens to the code following a successful execlp() call?
It is never executed. execlp() replaces the entire process memory image with a new program; if it succeeds, the original code is gone.