exam2

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/84

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

85 Terms

1
New cards

Scheduler

Part of the OS kernel that decides which process runs and for how long

2
New cards

Scheduling Algorithm

Determines which process to run next based on a policy

3
New cards

First In First Out (FIFO)

Runs processes in the order they arrive, to completion

4
New cards

Shortest Job First (SJF)

Runs the process with the shortest total runtime next

5
New cards

Shortest Time to Completion First (STCF)

Preempts current process if a new one has shorter remaining time

6
New cards

Round-Robin (RR)

Each process gets a fixed time slice before being preempted and placed at the end of the queue

7
New cards

Turnaround Time

Completion Time - Arrival Time

8
New cards

Response Time

First Run Time - Arrival Time

9
New cards

Throughput

Number of processes completed per unit time

10
New cards

CPU-bound process

Spends most time doing computation

11
New cards

I/O-bound process

Spends most time waiting for I/O

12
New cards

Timer Interrupt

Preempts a process if it has exceeded its timeslice

13
New cards

System Call Trap

Scheduler may run after a system call if higher priority task is available

14
New cards

MLFQ

Scheduling algorithm with multiple priority queues

15
New cards

MLFQ Rule 1

Higher priority process runs before lower priority

16
New cards

MLFQ Rule 2

Equal priority processes run in round-robin

17
New cards

MLFQ Rule 3

New process starts in highest priority queue

18
New cards

MLFQ Rule 4a

Process that uses full timeslice is demoted

19
New cards

MLFQ Rule 4b

Process that yields early keeps its priority

20
New cards

MLFQ Rule 5

All processes promoted to top after time S to prevent starvation

21
New cards

CFS Goal

Divide CPU time fairly among processes using vruntime

22
New cards

Virtual Runtime (vruntime)

Amount of CPU time a process has used, adjusted by weight

23
New cards

Nice Value

Ranges from -20 (high priority) to +19 (low priority); default is 0

24
New cards

CFS Timeslice

sched_latency / number of processes

25
New cards

Process with lowest vruntime

Scheduled next

26
New cards

Lottery Scheduling

Each process gets tickets; one ticket is picked at random to choose next process

27
New cards

More tickets

Higher chance of being scheduled

28
New cards

Real-Time System

Must meet both logical and timing correctness

29
New cards

Hard Real-Time System

Missing a deadline is a system failure

30
New cards

Soft Real-Time System

Occasional deadline misses tolerated

31
New cards

Earliest Deadline First (EDF)

Dynamic priority; task with earliest deadline gets CPU

32
New cards

Rate Monotonic Scheduling (RMS)

Static priority; task with shortest period gets highest priority

33
New cards

Utilization (ui)

Execution Time / Period

34
New cards

Total Utilization (U)

Sum of all task utilizations

35
New cards

Priority Inversion

High-priority task is blocked by a lower-priority one holding a needed resource

36
New cards

Priority Inheritance

Temporarily boosts priority of blocking task to unblock high-priority one

37
New cards

Pipe

One-way communication channel between processes

38
New cards

pipe(int fd[2])

Creates a pipe; fd[0] for reading, fd[1] for writing

39
New cards

dup2(oldfd, newfd)

Duplicates a file descriptor; used to redirect input/output

40
New cards

Socket

Endpoint for network communication

41
New cards

SOCK_STREAM

Used for TCP (reliable, ordered, byte-stream)

42
New cards

SOCK_DGRAM

Used for UDP (unreliable, message-oriented)

43
New cards

AF_INET

Address family for IPv4 Internet

44
New cards

bind()

Assigns address to socket

45
New cards

listen()

Marks socket as passive to accept connections

46
New cards

accept()

Accepts an incoming connection

47
New cards

connect()

Initiates a connection to server

48
New cards

read(), write()

Used for reading/writing on socket

49
New cards

TCP

Reliable, ordered, connection-oriented protocol

50
New cards

UDP

Unreliable, unordered, connectionless protocol

51
New cards

Filesystem

Collection of files and directories organized hierarchically

52
New cards

Superblock

Stores metadata about filesystem (e.g., size, number of inodes)

53
New cards

Inode

Metadata for a file (owner, size, timestamps, data block pointers)

54
New cards

Directory

Special file mapping names to inode numbers

55
New cards

Extents

In ext4, store starting block + length of contiguous blocks

56
New cards

Data Block

Contains actual file content

57
New cards

Indirect Pointer

Pointer to a block of pointers

58
New cards

Double Indirect Pointer

Pointer to a block of indirect pointers

59
New cards

Triple Indirect Pointer

Pointer to a block of double indirect pointers

60
New cards

Journaling

Write-ahead log of updates to ensure crash consistency

61
New cards

Metadata Journaling

Only metadata (not data) is written to journal

62
New cards

Journal Write

Write update to journal

63
New cards

Journal Commit

Write commit block

64
New cards

Checkpoint

Apply updates to actual disk

65
New cards

Free Journal Entry

Mark journal transaction as complete

66
New cards

Polling

CPU repeatedly checks if device is ready

67
New cards

Interrupts

Device notifies CPU when ready

68
New cards

PIO (Programmed I/O)

CPU transfers data to/from device

69
New cards

DMA (Direct Memory Access)

Device transfers data directly to memory

70
New cards

Memory-Mapped I/O

Device registers mapped to memory addresses

71
New cards

SJF Average Turnaround Time Formula

(Completion Time - Arrival Time) for each / number of processes

72
New cards

CFS selects task with

Lowest vruntime

73
New cards

CFS time slice is same for all tasks

False

74
New cards

Scheduler that preempts dynamically

Earliest Deadline First (EDF)

75
New cards

When high priority waits for low priority holding resource

Priority Inversion

76
New cards

Pipes communication direction

One-way

77
New cards

Pipes require same machine?

True

78
New cards

User Datagram Protocol (UDP)

Preserving message boundaries

79
New cards

Structure with file metadata

Inode

80
New cards

Directory maps

Filename, Inode number

81
New cards

Journaling doesn't store

Data blocks

82
New cards

Third journaling phase

Checkpoint

83
New cards

Total utilization U = sum of ei/pi

Real-time task system scheduling

84
New cards

Crash causes space leak if order is

db -> i -> dm

85
New cards

Hybrid I/O method order

Polling then interrupt (False on "interrupts then polling")