Operating Systems: Processes, Threads, and CPU Scheduling

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/57

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering process concepts, state transitions, PCB, scheduling queues, interprocess communication, multithreading models, and CPU scheduling algorithms.

58 Terms

1
New cards

Process

A program under execution whose current activity is represented by the program counter and CPU registers.

2
New cards

Stack

The section of process memory used to store temporary data, including local variables, function parameters, return addresses, and function return values; it grows downwards towards the heap.

3
New cards

Heap

The memory section used for dynamic memory allocation during process runtime; it grows upwards towards the stack.

4
New cards

Data Section

The part of process memory that contains global and static variables.

5
New cards

Text Section

The part of process memory comprising the compiled program code, located at the lowest address base (00).

6
New cards

Process in Memory Structure

The structural layout of a process in memory consisting of the text section at address 00, followed by data, dynamic heap growing upwards, and stack growing downwards from maximum address space.

<p>The structural layout of a process in memory consisting of the text section at address $$0$$, followed by data, dynamic heap growing upwards, and stack growing downwards from maximum address space.</p>
7
New cards

New State

The state when a process is in the stage of being created.

8
New cards

Ready State

The state where a process has all resources it needs to run and is waiting in memory to be assigned to the processor.

9
New cards

Running State

The state in which process instructions are actively being executed by the CPU.

10
New cards

Waiting State

The state where a process is waiting for an event to occur, such as keyboard input, disk access, inter-process messages, or timer expiration.

11
New cards

Terminated State

The state reached when a process has completed its execution.

12
New cards

Process State Diagram

A state machine illustrating the transitions between the five process states: new, ready, running, waiting, and terminated.

<p>A state machine illustrating the transitions between the five process states: new, ready, running, waiting, and terminated.</p>
13
New cards

Process Control Block (PCB)

A data structure storing all information specific to a process, including process state, program counter, CPU registers, scheduling parameters, memory limits, accounting data, and I/O status.

<p>A data structure storing all information specific to a process, including process state, program counter, CPU registers, scheduling parameters, memory limits, accounting data, and I/O status.</p>
14
New cards

Job Queue

A queue that stores all processes admitted to the computer system.

15
New cards

Ready Queue

A queue of processes residing in main memory that are ready and waiting to execute on the CPU, typically maintained as a linked list of PCBs.

16
New cards

Device Queue

A queue containing processes that are waiting for a specific I/O device to become available.

17
New cards

Ready Queue and I/O Device Queues

Linked-list structures maintained with header head and tail pointers that point to PCBs waiting for the CPU or specific device units.

<p>Linked-list structures maintained with header head and tail pointers that point to PCBs waiting for the CPU or specific device units.</p>
18
New cards

Long-Term Scheduler (Job Scheduler)

A scheduler that selects jobs from the secondary memory job pool on disk and loads them into main memory, controlling the degree of multiprogramming.

19
New cards

Short-Term Scheduler (CPU Scheduler)

A scheduler that frequently selects a process from main memory that is ready to execute and allocates the CPU to it.

20
New cards

Medium-Term Scheduler

A scheduler used in time-sharing systems that swaps processes out of memory to disk to reduce the degree of multiprogramming and swaps them back in when system load decreases.

<p>A scheduler used in time-sharing systems that swaps processes out of memory to disk to reduce the degree of multiprogramming and swaps them back in when system load decreases.</p>
21
New cards

I/O-Bound Process

A process that spends more time performing I/O operations than computations, generating many short CPU bursts.

22
New cards

CPU-Bound Process

A process that spends more time executing calculations than doing I/O operations, generating few, long CPU bursts.

23
New cards

Degree of Multiprogramming

The number of processes currently present in main memory.

24
New cards

Context Switch

The operating system mechanism of saving the CPU register state of the currently running process into its PCB and restoring the state of another process from its PCB.

<p>The operating system mechanism of saving the CPU register state of the currently running process into its PCB and restoring the state of another process from its PCB.</p>
25
New cards

fork() System Call

A UNIX system call that creates a duplicate child process, returning the child PID to the parent process, 00 to the child process, and −1-1 upon failure.

26
New cards

Cascading Termination

The automatic termination of all child and descendant processes by the operating system when the parent process exits.

27
New cards

Zombie Process

A process that has finished execution via exit() but remains in the process table because its parent has not yet called wait().

28
New cards

Orphan Process

A process whose parent terminated without waiting; it is subsequently adopted by the init process (PID 11) which periodically reaps it.

29
New cards

Shared Memory System

An interprocess communication model where communicating processes share a mapped memory segment within their address spaces to read and write large blocks of data without kernel system calls after setup.

30
New cards

Message Passing System

An interprocess communication model where processes exchange information by sending and receiving messages through operating system kernel primitives.

<p>An interprocess communication model where processes exchange information by sending and receiving messages through operating system kernel primitives.</p>
31
New cards

Direct Communication

A message-passing mechanism where the sender and receiver processes must explicitly name each other to communicate (e.g., send(P, message)).

32
New cards

Indirect Communication

A message-passing mechanism where messages are dispatched to and retrieved from shared mailboxes or ports that possess unique IDs.

33
New cards

Blocking Send

A synchronous communication operation where the sender process waits until the message is received by the destination process or mailbox.

34
New cards

Non-blocking Send

An asynchronous communication operation where the sender transmits the message and immediately continues execution without waiting.

35
New cards

Thread

The basic unit of CPU utilization, comprising a thread ID, program counter, register set, and a stack, sharing address space and open files with other threads in the process.

<p>The basic unit of CPU utilization, comprising a thread ID, program counter, register set, and a stack, sharing address space and open files with other threads in the process.</p>
36
New cards

Many-to-One Model

A multithreading model where many user-level threads map to a single kernel thread, causing the entire process to block if one thread executes a blocking system call.

<p>A multithreading model where many user-level threads map to a single kernel thread, causing the entire process to block if one thread executes a blocking system call.</p>
37
New cards

One-to-One Model

A multithreading model where each user thread maps to a dedicated kernel thread, allowing concurrent execution across multiple CPUs but introducing higher thread-creation overhead.

<p>A multithreading model where each user thread maps to a dedicated kernel thread, allowing concurrent execution across multiple CPUs but introducing higher thread-creation overhead.</p>
38
New cards

Many-to-Many Model

A multithreading model that multiplexes many user threads onto an equal or smaller number of kernel threads, balancing developer flexibility with kernel efficiency.

<p>A multithreading model that multiplexes many user threads onto an equal or smaller number of kernel threads, balancing developer flexibility with kernel efficiency.</p>
39
New cards

Lightweight Process (LWP)

An intermediate structure between user and kernel threads in many-to-many systems that acts as a virtual processor upon which user-thread libraries schedule threads.

<p>An intermediate structure between user and kernel threads in many-to-many systems that acts as a virtual processor upon which user-thread libraries schedule threads.</p>
40
New cards

Thread-Local Storage (TLS)

Data storage allocated such that each individual thread within a process maintains its own unique instance of variables across function calls.

41
New cards

Upcall

A notification sent by the operating system kernel to the user thread library to inform it that a specific thread is about to block or is ready to run.

42
New cards

CPU-I/O Burst Cycle

The recurring pattern in program execution consisting of cycles of CPU processing (CPU burst) followed by periods of waiting for input/output completion (I/O burst).

<p>The recurring pattern in program execution consisting of cycles of CPU processing (CPU burst) followed by periods of waiting for input/output completion (I/O burst).</p>
43
New cards

Non-Preemptive Scheduling

A scheduling scheme where a process keeps control of the CPU until it explicitly yields it by either terminating or entering the waiting state.

44
New cards

Preemptive Scheduling

A scheduling scheme where the operating system can forcibly take the CPU away from an executing process and reassign it to another process.

45
New cards

Dispatcher

The operating system module responsible for transferring control of the CPU to the process selected by the short-term scheduler through context switching, mode switching, and program restarting.

46
New cards

Dispatch Latency

The amount of time taken by the dispatcher to stop one process and start executing another.

47
New cards

CPU Utilization

The percentage of time that the CPU is actively performing work, typically ranging from 40%40\% to 90%90\% in real operating systems.

48
New cards

Throughput

A scheduling criterion measuring the total number of processes completed per unit of time.

49
New cards

Turnaround Time

The entire interval from process submission to process completion, calculated as the sum of periods spent waiting in queues, executing on the CPU, and performing I/O.

50
New cards

Waiting Time

The total cumulative time a process spends sitting in the ready queue waiting to be assigned CPU time.

51
New cards

Response Time

The duration of time from the submission of a request until the very first response is produced.

52
New cards

Convoy Effect

An inefficiency in FCFS scheduling where multiple short processes wait behind one long CPU-bound process, depressing overall CPU and I/O device utilization.

53
New cards

Shortest-Job-First (SJF) Scheduling

An optimal scheduling algorithm that allocates the CPU to the process with the shortest next CPU burst length to produce the minimum average waiting time.

54
New cards

Starvation

A situation in priority scheduling where low-priority processes remain blocked indefinitely because high-priority processes continually arrive and seize the CPU.

55
New cards

Aging

A technique used to prevent starvation by gradually incrementing the priority of processes that wait in the ready queue for extended periods.

56
New cards

Round-Robin (RR) Scheduling

A preemptive scheduling algorithm that assigns each ready process a fixed time quantum (1010 to 100 ms100\,\text{ms}) in circular FIFO queue order.

57
New cards

Multilevel Queue Scheduling

A scheduling algorithm that partitions the ready queue into multiple distinct queues permanently assigned to specific process types, each with its own scheduling algorithm.

<p>A scheduling algorithm that partitions the ready queue into multiple distinct queues permanently assigned to specific process types, each with its own scheduling algorithm.</p>
58
New cards

Multilevel Feedback-Queue Scheduling

A dynamic queue scheduling method that allows processes to move between priority queues based on CPU burst history, demoting long bursts and aging long-waiting jobs.

<p>A dynamic queue scheduling method that allows processes to move between priority queues based on CPU burst history, demoting long bursts and aging long-waiting jobs.</p>