OS 8.1

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

1/44

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:57 PM on 4/21/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

45 Terms

1
New cards

What is a program?

A passive entity, a collection of instructions and data stored on disk.

2
New cards

What is execution?

The act of the CPU reading and carrying out instructions from a program.

3
New cards

What is a CPU?

Central Processing Unit, the hardware that performs calculations and executes instructions.

4
New cards

What is memory (RAM)?

The computer's working space where active programs and data are stored for fast access by the CPU.

5
New cards

What is a process?

A program in execution; an active entity loaded into memory.

6
New cards

What are the four main components of a process?

Program (text) section, program counter (PC), stack, data section.

7
New cards

What is the program (text) section of a process?

The actual code (instructions) of the program being executed.

8
New cards

What is the program counter (PC)?

A register holding the memory address of the next instruction to be executed.

9
New cards

What is the stack in a process?

A region of memory for temporary data like function parameters, return addresses, and local variables.

10
New cards

What is the data section in a process?

A region of memory for global variables accessible by the entire program.

11
New cards

List the five process states.

New, ready, running, waiting, terminated.

12
New cards

What does the "new" state mean?

The process is being created; the OS is performing initial setup.

13
New cards

What does the "ready" state mean?

The process is loaded into memory and waiting to be assigned to a CPU.

14
New cards

What does the "running" state mean?

Instructions are being executed by the CPU.

15
New cards

What does the "waiting" state mean?

The process is waiting for some event (e.g., I/O) to occur.

16
New cards

What does the "terminated" state mean?

The process has finished execution.

17
New cards

On a single-core machine, how many processes can be in the running state at once?

Only one.

18
New cards

What is a Process Control Block (PCB)?

A kernel data structure that holds all information about a process; its "ID card".

19
New cards

What is stored in the PCB?

Process state, program counter, CPU registers, CPU scheduling info, memory-management info, accounting info, I/O status info.

20
New cards

What is the purpose of saving CPU registers in the PCB?

To allow the OS to restore the process's state when it resumes execution after a context switch.

21
New cards

What kind of accounting information might be in a PCB?

CPU time used, process ID (PID), time limits.

22
New cards

What is the purpose of memory-management information in a PCB?

Details about allocated memory, such as pointers to page tables or segment tables.

23
New cards

What does I/O status information in a PCB include?

A list of open files and devices used by the process.

24
New cards

What is a parent process?

A process that creates another process.

25
New cards

What is a child process?

A process created by a parent process.

26
New cards

What is a Process Identifier (PID)?

A unique number assigned to each process for identification and management.

27
New cards

What are three resource-sharing options when a parent creates a child?

1) Parent and children share all resources; 2) Children share a subset of parent's resources; 3) Parent and child share no resources.

28
New cards

What are two execution models for parent and child processes?

1) Parent and children execute concurrently; 2) Parent waits until children terminate.

29
New cards

What does the fork() system call do?

Creates a new process (child) that is an almost exact copy of the calling process (parent).

30
New cards

What does the exec() family of system calls do?

Replaces a process's memory space with a new program, often used after fork() to transform a child process.

31
New cards

Why is exec() typically called after fork()?

To allow the child process to run a different program from the parent.

32
New cards

How does a process normally terminate?

It executes its last statement and calls the exit() system call to ask the OS to delete it.

33
New cards

What happens when a process calls exit()?

Output data may be passed to parent via wait, and all resources are deallocated by the OS.

34
New cards

What is aborting a process?

When a parent forcibly terminates one of its child processes.

35
New cards

List reasons a parent might abort a child.

Child exceeded allocated resources, task is no longer required, or parent is exiting.

36
New cards

What is cascading termination?

Some operating systems terminate all children if the parent terminates, preventing orphaned processes.

37
New cards

What is a context switch?

The mechanism by which the OS switches the CPU from one process to another.

38
New cards

What happens during a context switch?

The system saves the state (e.g., registers, PC) of the old process into its PCB, and loads the saved state of the new process from its PCB.

39
New cards

What is overhead in the context of a context switch?

The time spent saving and restoring process states; the system does no useful work during the switch.

40
New cards

What does context switch time depend on?

Hardware support, specifically the number of registers that must be saved and restored.

41
New cards

Why are context switches considered costly?

They consume CPU cycles that could otherwise be used for executing user processes.

42
New cards

What is the difference between a program and a process?

A program is a passive file on disk; a process is an active instance of a program loaded into memory and executing.

43
New cards

How are processes managed by the operating system?

Through the use of process states, the Process Control Block (PCB), and scheduling.

44
New cards

What system calls are commonly used for process creation in UNIX?

fork() and exec().

45
New cards

What is the role of the wait() system call in process termination?

It allows a parent to collect output data from a child that has terminated.