Operating Systems - Ultra-Simple Flashcard Version

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/52

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.

53 Terms

1
New cards

Program Counter (PC)

Points to the NEXT instruction to execute, acting like a bookmark for code execution.

2
New cards

Stack Pointer (SP)

Points to the top of the process's stack, holding function calls, local variables, and return addresses.

3
New cards

PSW/FLAGS Register

Status flags indicating results of last CPU operation, used in decisions like if statements and loops.

4
New cards

Pseudoparallelism

Fake simultaneous execution where the CPU switches between processes rapidly, giving the illusion of concurrency.

5
New cards

Multiprogramming

Multiple programs loaded in memory that use the CPU while one is waiting for I/O.

6
New cards

Copy-on-Write

Memory sharing technique where parent and child processes share pages until one tries to write.

7
New cards

Context Switch

The process of saving the current state of one process and loading the state of another.

8
New cards

Critical Region

Code section that accesses shared resources, limiting to one process execution at a time.

9
New cards

Mutual Exclusion

Only ONE process may be in the critical region at one time, preventing race conditions.

10
New cards

Race Condition

Output dependency on the timing of execution, making it unpredictable and hard to debug.

11
New cards

Spin Lock

A loop that repeatedly checks if a lock is free, wasting CPU cycles on short waits.

12
New cards

Semaphore

An integer counter used to manage resources, blocking processes when necessary.

13
New cards

Kernel

The core of an OS that has full control over hardware and software interactions.

14
New cards

Kernel Jobs

Includes process management, memory management, device management, file system, and scheduling.

15
New cards

Program

Static code on disk, representing a set of instructions that can be executed.

16
New cards

Process

An executing program that comprises code, data, and the current CPU state.

17
New cards

Thread

A lightweight unit of execution within a process, sharing resources but with individual stacks.

18
New cards

Process State: READY

The process is prepared to run and is waiting for CPU allocation.

19
New cards

Process State: RUNNING

Refers to the current process actively executing on the CPU.

20
New cards

Process State: BLOCKED

The process is unable to proceed, typically waiting for I/O or events.

21
New cards

READY to RUNNING

Transition initiated by the scheduler for a process to begin its execution.

22
New cards

RUNNING to READY

Occurs when a time slice expires or a higher priority process preempts execution.

23
New cards

RUNNING to BLOCKED

The process voluntarily waits for resources like I/O or a semaphore.

24
New cards

BLOCKED to READY

Occurs when the event a process is waiting for has occurred.

25
New cards

Context Switch Steps

Process of switching contexts includes saving registers, updating state, and restoring the new process.

26
New cards

Bad Context Switch Problems

Can lead to race conditions, corrupted variables, and inconsistent data if mishandled.

27
New cards

Process Abstraction

Perception by the OS that each process owns the entire system, ensuring memory protection.

28
New cards

Thread Abstraction

Involves multiple execution paths within a process, allowing efficient resource sharing.

29
New cards

Process Table (proctab)

Array used to manage processes, indexed by their PID for quick access.

30
New cards

Current Process

Accessed using the variable currpid to determine the PID of the running process.

31
New cards

Ready List

Queue containing all processes in the READY state waiting for CPU allocation.

32
New cards

Semaphore in Xinu

Comprises a count for resources and a queue for waiting processes.

33
New cards

wait() Operation

Decrements semaphore count and blocks the process if count goes negative.

34
New cards

signal() Operation

Increments semaphore count and may wake a waiting process if count is non-positive.

35
New cards

Semaphore Count Meaning

Indicates resource availability. Positive = available, Negative = number of waiting processes.

If it’s negative, that many processes are waiting to run (blocked).
If it’s positive, there are available resources, and no processes are blocked.

36
New cards

receive()

A blocking operation for message reception, waiting indefinitely if no message is present.

37
New cards

recvclr()

A non-blocking message receive that returns immediately if no message is available.

38
New cards

recvtime()

Message reception that includes a specified timeout period for waiting.

39
New cards

Killing SLEEPING Process

Involves removing the process from the sleep queue to avoid crashes.

40
New cards

Killing READY Process

Requires removal from the ready list to prevent attempts to run a dead process.

41
New cards

Killing WAITING Process

Involves removing it from the semaphore queue and handling semaphore increments.

42
New cards

Process Entry Fields

Includes essential fields like Name, Priority, PID, and State for each process.

43
New cards

Invariants

Rules maintaining consistency of states in process queues and current process handling.

44
New cards

User-Level Threads

Thread management by a library, with the kernel recognizing only one process.

45
New cards

Kernel-Level Threads

Managed by the kernel with independent scheduling, allowing concurrency across CPUs.

46
New cards

fork() Function

Creates a duplicate of the calling process, allowing concurrent execution with distinct return values.

47
New cards

Atomic Action

Operations that complete without interruption, ensuring integrity in execution.

48
New cards

Why Race Conditions Hard to Debug

Due to their timing-dependent nature, making non-reproducible outcomes likely.

49
New cards

Spin Lock vs Semaphore

Spin lock wastes CPU on short waits, while semaphores block processes, saving CPU.

50
New cards

Blocking and I/O

I/O operations put processes into BLOCKED state, allowing CPU multitasking.

51
New cards

Preemption

Higher priority processes can interrupt and take over the running process.

52
New cards

Quantum (Time Slice)

The maximum duration a process can run before being interrupted for scheduling fairness.

53
New cards

Priority Scheduling

Organizes the ready list by process priority, allowing critical tasks precedence.