1/35
Flashcards covering the fundamentals of operating system processes, including identifiers, states, context, scheduling, and system calls based on the Processes I lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Program
A passive set of instructions stored on a secondary storage device, such as a disk.
Process
An active execution of a program stored in memory; it becomes a process when the program is loaded into memory.
Process Resources
The components a process needs to accomplish its task, including CPU time, memory, files, and I/O devices.
PID (Process ID)
A unique, non-negative integral number assigned to each process by the OS to distinguish it from others.
Parent Process
The process that started another process; every process has one.
Child Process
A process spawned by a parent process; the kernel uses the PID to manage and control it during its lifetime.
swapper/sched
A system process with PID0 that is part of the kernel and is responsible for memory management.
init
A continually-running daemon process with PID1 responsible for starting up and shutting down the system at the end of the bootstrap procedure.
systemd
The service that has replaced init as the system manager in many Linux distributions.
pstree
A Linux command that prints a tree showing the hierarchy of all running processes.
renice
A command used in Linux by system administrators to change the priority (nice value) of a running process.
ps
A command that shows processes run by the user executing it, including the PID, Terminal (TTY), aggregated execution time (TIME), and the command (CMD).
User Level Context
The segment of memory where a program is organized when loaded, consisting of text, data, heap, and stack segments.
Text Segment
The part of the User Level Context that contains the actual program code or executable instructions.
Data Segment
The part of the User Level Context that contains global and static variables initialized at runtime.
Heap Segment
The part of the User Level Context containing dynamic memory allocated at runtime.
Stack Segment
The part of the User Level Context containing return addresses, function parameters, and local variables.
Register Context
The part of the process context that includes hardware-dependent information such as the Program Counter (PC), Processor Status Register, Stack Pointer (SP), and General-Purpose Registers (R0, R1, etc.).
Program Counter (PC)
A register that contains the address of the next instruction to be executed by the process.
Stack Pointer (SP)
A register that points to the top of the kernel or user stack, depending on the mode of operation.
Created State
The initial state of a process, also referred to as "new."
Waiting State
The state where a process is awaiting to be scheduled for execution, also referred to as "ready."
Running State
The state where a process is actively executing instructions on the CPU.
Blocked State
The state where a process is unable to continue until a specific event occurs, such as an I/O operation.
Terminated State
The final state of a process when it is no longer running due to completion or being killed.
Zombie State
A state where a process no longer exists after executing the exit system call but leaves a record for its parent process to collect.
Process Control Block (PCB)
A data structure used by the OS to store context information, process status, priority, and other management data for each process.
Short-term Scheduler
Also known as the CPU Scheduler, it selects which process should be executed next and allocates the CPU; it is invoked every few milliseconds.
Long-term Scheduler
Also known as the Job Scheduler, it selects processes to be brought into the ready queue to control the degree of multiprogramming; it is invoked infrequently (seconds or minutes).
I/O-bound Process
A process that spends more time performing I/O than computations, characterized by many short CPU bursts.
CPU-bound Process
A process that spends more time doing computations than I/O, characterized by a few very long CPU bursts.
Context Switch
The process where the OS saves the state (PCB) of the current process and loads the saved state of a new process to be executed.
Overhead
The time spent by the system during a context switch (typically about 1msec) where no useful work is being performed.
SunUltraSPARC
A processor hardware that supports multiple register sets, allowing context switches to occur very quickly by simply changing a pointer.
exec() System Call
A family of system calls that replaces the current process's instructions, data, heap, and stack segments with a new program from disk while keeping the same PID.
execlp
A version of the exec function that takes the filename and arguments as separate parameters and searches for the command using the PATH environment variable.