4348 exam1

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

1/587

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:14 PM on 10/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

588 Terms

1
New cards

What is a process?

An abstraction of a program in execution.

2
New cards

What is a program?

A set of instructions stored on disk that is not actively executing.

3
New cards

What is the difference between a program and a process?

A program is a passive entity stored on disk; a process is an executing instance of a program.

4
New cards

What resources does a process need?

CPU time, main memory, and input/output (I/O) devices.

5
New cards

What is the purpose of the CPU for a process?

To decode and execute instructions.

6
New cards

What is the purpose of main memory for a process?

To store the instructions and data needed while the process executes.

7
New cards

What is the purpose of I/O devices for a process?

To allow interaction with the outside world.

8
New cards

What does CPU stand for?

Central Processing Unit.

9
New cards

What information does the CPU maintain about the process it is executing?

Execution information such as the program counter, instruction register, general-purpose registers, condition codes, and stack pointer.

10
New cards

What is the program counter (PC)?

A CPU register that stores the address of an instruction associated with the current execution.

11
New cards

What is the instruction register (IR)?

A CPU register that stores the instruction being executed.

12
New cards

What are general-purpose registers?

CPU registers used to temporarily store operands and other working data.

13
New cards

What is an operand?

A value or data item that an instruction operates on.

14
New cards

What is the arithmetic logic unit (ALU)?

The CPU component that performs arithmetic and logical operations on data in CPU registers.

15
New cards

What is the condition code register (CCR)?

A register that stores the result status of an operation.

16
New cards

What are other names for the condition code register (CCR)?

Status register or flag register.

17
New cards

What is the stack pointer (SP)?

A CPU register used to support function calls by tracking the stack.

18
New cards

Why does a process need main memory?

Its instructions and data need to reside in main memory while it runs.

19
New cards

Can the CPU directly access data stored on a hard disk drive?

No. The data must be brought into main memory before the CPU can use it.

20
New cards

How does the speed of main memory compare with the CPU?

Main memory is much slower than the CPU.

21
New cards

What is latency?

The delay involved in accessing a resource or completing an operation.

22
New cards

What is the latency gap between the CPU and main memory?

The CPU can operate faster than main memory can supply instructions and data, potentially leaving the CPU waiting.

23
New cards

What is caching?

Storing frequently or usefully needed information in faster memory so it can be accessed more quickly.

24
New cards

Why is caching used between the CPU and main memory?

To help hide the latency gap between the CPU and main memory.

25
New cards

What can happen if the CPU frequently waits for main memory?

The CPU may remain idle instead of executing useful work.

26
New cards

What types of caches are mentioned in the PowerPoint?

Address translation caches, instruction caches, and data caches.

27
New cards

What cache levels are mentioned in the PowerPoint?

L1, L2, L3, and L4.

28
New cards

Is caching alone sufficient to keep the CPU busy?

No. Other techniques are also needed to improve CPU utilization.

29
New cards

What is CPU utilization?

The proportion of time the CPU is busy performing work.

30
New cards

What are I/O devices?

Devices used by a computer to interact with the outside world.

31
New cards

What are examples of I/O devices?

Keyboard, display or monitor, mouse, touchscreen, hard disk, printer, and webcam.

32
New cards

How does the speed of a typical I/O device compare with main memory?

A typical I/O device is much slower than main memory.

33
New cards

What is the I/O latency gap?

The delay caused by I/O devices operating much more slowly than the CPU or main memory.

34
New cards

Why is I/O latency a problem for CPU utilization?

A process may have to wait for an I/O operation to complete, leaving the CPU unable to make progress on that process.

35
New cards

What is the main idea behind realizing the process abstraction?

A running process requires more than program instructions on disk; it needs CPU execution, memory, and I/O resources.

36
New cards

What is multiprogramming?

The ability of an operating system to execute more than one program using a single-processor machine.

37
New cards

How does multiprogramming work?

The OS repeatedly switches to another process after executing the current process for some time.

38
New cards

Can multiple processes make progress without any one process completing?

Yes. Multiprogramming allows multiple processes to make progress over time.

39
New cards

Why can multiprogramming make a single CPU appear to run multiple processes simultaneously?

Rapid switching creates the illusion of simultaneous execution.

40
New cards

What is required for true simultaneous execution of multiple processes?

Multiple CPUs or processor cores capable of executing them at the same time.

41
New cards

What are the two types of process switching triggers described in the slides?

Event-based switching and time-based switching.

42
New cards

What is event-based switching?

Switching when an event occurs, such as a process waiting for an I/O operation to complete.

43
New cards

What is time-based switching?

Switching after a process has used the CPU for a sufficiently long time.

44
New cards

What are the three requirements for supporting multiprogramming?

The OS must stop and resume processes, share resources fairly, and protect processes from one another.

45
New cards

Why must the OS be able to stop and resume a process?

So it can switch between processes without changing their correct outcomes, apart from delaying completion.

46
New cards

What does seamless process switching mean?

Switching should not affect a process's outcome; its only effect should be a possible delay in completion.

47
New cards

What resources must be shared fairly among processes?

CPU time, memory, and I/O devices.

48
New cards

Why is fair resource sharing important?

It prevents one process from monopolizing system resources.

49
New cards

What does process protection mean?

Preventing one process from improperly reading or modifying another process's data.

50
New cards

What is a process control block (PCB)?

An OS bookkeeping record for a process, used to save its execution context when it is interrupted.

51
New cards

What is a process table?

A table maintained by the OS that stores the records or PCBs of processes.

52
New cards

What is the degree of multiprogramming?

The maximum number of processes that can run concurrently.

53
New cards

What limits the degree of multiprogramming?

The size of the process table and factors such as the memory used by current processes.

54
New cards

What information is stored in a PCB?

Process identifier, CPU register contents, process state, scheduling information, memory-management information, accounting information, and I/O status information.

55
New cards

What is a process identifier (PID)?

A unique identifier for a process.

56
New cards

What CPU information is stored in a PCB?

Register contents such as the program counter, stack pointer, and condition register.

57
New cards

What process state information is stored in a PCB?

The process's current execution state, such as new, ready, running, waiting, or terminated.

58
New cards

What CPU scheduling information is stored in a PCB?

Process priority, scheduling queue information, and other scheduling parameters.

59
New cards

What memory-management information is stored in a PCB?

Information such as base and limit registers, page tables, and segment tables.

60
New cards

What accounting information is stored in a PCB?

Information such as CPU time used, time limits, account numbers, and job or process numbers.

61
New cards

What I/O status information is stored in a PCB?

Information about allocated I/O devices and open files.

62
New cards

What is a system call?

A request by a process for an operating-system service or resource.

63
New cards

Why does a process use a system call to request a resource?

Processes cannot manage resources directly; the OS handles the request.

64
New cards

What happens when a process invokes a system call?

Execution control transfers to the OS, which executes the code needed to service the request.

65
New cards

What are the five broad categories of system calls?

Process control, file management, device management, information maintenance, and communications.

66
New cards

Which Unix/Linux system call creates a new process?

fork()

67
New cards

Which Unix/Linux system call terminates a process?

exit()

68
New cards

Which Unix/Linux system call waits for another process?

wait()

69
New cards

Which Unix/Linux system calls are used to open, read, write, and close files?

open(), read(), write(), and close().

70
New cards

Which Unix/Linux system call can set the input/output mode of an I/O device?

ioctl()

71
New cards

Which Unix/Linux system call retrieves a process identifier?

getpid()

72
New cards

Which Unix/Linux system call retrieves the system time?

time()

73
New cards

Which Unix/Linux system call obtains file attributes?

stat()

74
New cards

Which Unix/Linux system call creates a pipe?

pipe()

75
New cards

Which Unix/Linux system calls can send and receive messages?

sendmsg() and recvmsg().

76
New cards

What is user mode?

A restricted CPU execution mode in which only a limited set of instructions can be executed.

77
New cards

What is kernel mode?

A privileged CPU execution mode in which any instruction from the instruction set can be executed.

78
New cards

What are other names for kernel mode?

Privileged mode, unrestricted mode, or supervisory mode.

79
New cards

What is a privileged instruction?

An instruction that can only be executed in kernel mode because it can affect protected resources or system operation.

80
New cards

Why must privileged instructions be restricted?

They could be misused to access another process's data or monopolize system resources.

81
New cards

What are examples of privileged instructions?

Instructions for I/O, interrupt handling, timer control, processor status settings, and storage protection settings.

82
New cards

What enforces the restriction on privileged instructions?

Hardware enforces that privileged instructions can only execute in kernel mode.

83
New cards

Why is trusted code required in kernel mode?

Kernel-mode code can perform powerful operations that affect the system and other processes.

84
New cards

What is a mode switch?

A change in CPU execution mode, such as switching from user mode to kernel mode or back.

85
New cards

What instruction causes a switch from user mode to kernel mode when requesting an OS service?

A trap instruction.

86
New cards

What is another name for a trap instruction in the slides?

A software interrupt.

87
New cards

How is a hardware interrupt different from a trap?

A hardware interrupt is typically generated by a hardware device, while a trap is used to transfer control to the kernel for a software request.

88
New cards

What happens when a trap instruction executes?

Control transfers to a predefined entry point in kernel code.

89
New cards

What happens during a system call's mode-switch sequence?

User code invokes a system call, the CPU switches to kernel mode to execute OS code, and then switches back to user mode when the call returns.

90
New cards

Is a mode switch the same as a process switch?

No. A mode switch changes the CPU's privilege mode; a process switch changes which process is executing.

91
New cards

Why does the OS need protection between processes?

So one process cannot improperly access or modify another process's data.

92
New cards

What is a process address space?

The memory space associated with a process, containing the portion of its process image stored in memory.

93
New cards

What is a logical address?

An address generated by a program within its own address space.

94
New cards

What is a physical address?

The actual location in physical memory where data or instructions reside.

95
New cards

What is address translation?

The conversion of a logical address generated by a process into a physical memory address.

96
New cards

Why is address translation necessary?

It maps process-generated logical addresses to physical memory locations and helps validate that the access belongs to the current process.

97
New cards

What hardware performs address translation and validation?

Special memory-management hardware.

98
New cards

What are two forms of address-translation data mentioned in the slides?

Base and limit registers, and page tables.

99
New cards

What are base and limit registers used for?

They provide information used to translate and validate a process's memory addresses.

100
New cards

What is a page table?

A data structure used in address translation to map a process's logical pages to physical memory.