Operating Systems: Architecture, Memory Management, and File Systems

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

1/59

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering C memory management, process synchronization, CPU scheduling, virtual memory paging, segmentation, and filesystem architectures based on operating systems lecture notes.

60 Terms

1
New cards

Pointer

A variable that stores the memory address of another variable or data structure rather than the actual direct data value.

2
New cards

Array Decay

The process in C where an array passed as an argument to a function implicitly converts to a pointer to its first element, resulting in the loss of information about the array's size and dimensions.

3
New cards

Text Segment

The segment of an executable or object file in memory that contains the compiled machine code instructions; it is typically read-only to prevent accidental modification.

4
New cards

Initialized Data Segment (.data)

The region of program memory that stores global, static, constant, and external variables that are explicitly initialized with values before execution.

5
New cards

Uninitialized Data Segment (.bss)

The region of program memory that stores all uninitialized global, static, and external variables, which are zero-initialized by the system at runtime.

6
New cards

Stack Segment

A dynamically sized memory segment that automatically allocates space for local variables, function parameters, and the return address of instructions executed after a function completes.

7
New cards

Heap Segment

The area of RAM dynamically managed at runtime for arbitrary-sized allocations requested by functions such as malloc()\text{malloc}() and calloc()\text{calloc}().

8
New cards

Program Break (brk)

A pointer identifying the current boundary or end of the heap segment, which can be modified using the brk()\text{brk}() and sbrk()\text{sbrk}() system calls to expand or contract available heap space.

9
New cards

Anonymous Mapping

A virtual memory mapping created via mmap()\text{mmap}() that is not backed by any filesystem file or device; its requested memory is initialized to zero and used by dynamic allocators for large heap allocations.

10
New cards
<p>Executable and Linkable Format (ELF)</p>

Executable and Linkable Format (ELF)

The standard binary file format on Linux-based operating systems, containing an ELF header, program header table, code sections (.text\text{.text}), data sections (.rodata\text{.rodata}, .data\text{.data}), and a section header table.

11
New cards
<p>Implicit Free List Block Structure</p>

Implicit Free List Block Structure

A memory allocator block design consisting of a single-word header storing the block size and an allocation bit (a=1a = 1 for allocated, a=0a = 0 for free), followed by application payload and optional padding.

12
New cards

First Fit

An allocator search algorithm that scans the free list from the beginning and selects the first available free memory block that is large enough to satisfy the requested size.

13
New cards

Best Fit

An allocation algorithm that searches the entire list of free memory blocks to find and allocate the block whose size is closest to the requested size, minimizing leftover fragment size.

14
New cards

Worst Fit

An allocation algorithm that scans the entire free list and allocates from the largest available block so that the remaining portion is sufficiently large to remain useful.

15
New cards

Internal Fragmentation

Memory waste that occurs when fixed-size allocation units (such as pages or rounded block sizes) provide more storage than the requested data requires, leaving the remainder unused within that unit.

16
New cards

External Fragmentation

A condition occurring in dynamic memory or segmentation where total free memory is sufficient to satisfy a request, but is broken up into multiple non-contiguous holes too small to individually fulfill the request.

17
New cards

Process Control Block (PCB)

A kernel data structure representing a process that holds its execution state, process number (PID), program counter, CPU registers, memory limits, and open file descriptors.

18
New cards
<p>Context Switch</p>

Context Switch

The operational procedure by which the operating system saves the execution state of a running process into its PCB and loads the saved state of another process to resume execution on the CPU.

19
New cards
<p>Process State Transitions</p>

Process State Transitions

The operational cycle of a process moving between states: created to ready upon admission, ready to running via scheduler dispatch, running to waiting via I/O wait, waiting to ready upon I/O completion, running to ready on interrupt, and running to terminated on exit.

20
New cards

fork()

The POSIX system call used to create a new process by creating an exact duplicate of the parent process, including its address space, registers, file descriptors, and execution state.

21
New cards

User-Level Threads

Threads managed entirely in user space without kernel knowledge; they are fast to create, switch, and synchronize, but cannot utilize informed kernel scheduling or avoid blocking the whole process on a single blocking system call.

22
New cards

Kernel-Level Threads

Threads managed directly by the operating system kernel; operations involve kernel overhead, but the OS can schedule individual threads across multiple processors and manage blocking system calls independently.

23
New cards

Race Condition

A situation where two or more concurrent processes or threads read and write shared data such that the final outcome depends on the precise timing and order of execution.

24
New cards

Critical Region

The segment of program code that accesses shared memory or shared resources that must not be concurrently executed by multiple processes.

25
New cards

Mutual Exclusion

A synchronization condition ensuring that if one process is currently executing inside its critical region, no other process is allowed into that critical region at the same time.

26
New cards

Busy Waiting

A synchronization technique where a process repeatedly checks a condition in a tight loop until it becomes true, continuously consuming CPU cycles while waiting.

27
New cards

Peterson's Algorithm

A software-based, two-process mutual exclusion algorithm that combines process interest flags with a shared turn variable to safely guarantee mutual exclusion without requiring specialized hardware.

28
New cards

Counting Semaphore

A protected integer synchronization variable modified only via atomic operations: PP (or wait\text{wait} / down\text{down}), which decrements the value and blocks if it is not positive, and VV (or signal\text{signal} / up\text{up}), which increments the value and unblocks a waiting process.

29
New cards

Turnaround Time

The total elapsed time interval between the submission or arrival of a process and its eventual complete termination.

30
New cards

Round Robin (RR) Scheduling

A preemptive scheduling algorithm that assigns each runnable process a fixed time quantum in a circular first-in, first-out queue.

31
New cards

Shortest Job First (SJF)

A non-preemptive scheduling policy that selects the process with the shortest expected CPU burst time to execute first, minimizing overall average turnaround time.

32
New cards

Aging Algorithm (Scheduling)

A technique that estimates the next CPU burst time as a weighted sum of previous estimates and the most recently observed run time: testimated=aT0+(1−a)T1t_{\text{estimated}} = a T_0 + (1 - a) T_1.

33
New cards
<p>Base and Limit Registers</p>

Base and Limit Registers

A hardware dynamic relocation mechanism where the base register holds the starting physical memory address of the program and the limit register holds its length to verify access bounds.

34
New cards

Swapping

A memory management strategy in which idle processes are completely written out to a dedicated disk swap area and later brought back entirely into main memory when scheduled to run.

35
New cards

Virtual Address Space

The abstract logical set of memory addresses that a process can generate and access, which the hardware and operating system translate into physical memory addresses.

36
New cards
<p>Memory Management Unit (MMU)</p>

Memory Management Unit (MMU)

A specialized CPU hardware component responsible for translating incoming program-generated virtual addresses into physical addresses using page tables.

37
New cards

Page Frame

A fixed-size contiguous block of physical RAM into which a single virtual page can be loaded.

38
New cards

Page Fault

A hardware trap generated by the MMU when a program attempts to access a virtual page whose Present/Absent bit indicates that it is not currently resident in physical memory.

39
New cards
<p>Page Table Entry (PTE)</p>

Page Table Entry (PTE)

A hardware-interpreted record containing control bits—Caching disabled, Referenced, Modified (dirty), Protection (permissions), and Present/Absent—along with the target page frame number.

40
New cards

Translation Lookaside Buffer (TLB)

A high-speed associative hardware cache in the MMU that stores recent virtual-to-physical page mappings to avoid regular multi-step page table lookups in memory.

41
New cards

Multi-Level Page Table

A hierarchical paging structure that splits virtual addresses into multiple directory indices (e.g., PT1PT_1, PT2PT_2) and an offset, avoiding the requirement to keep all page tables in physical memory simultaneously.

42
New cards

Inverted Page Table

A page table architecture with one entry per physical page frame rather than per virtual page, tracking (PID,virtual page)(PID, \text{virtual page}) pairs to scale memory consumption with physical RAM rather than virtual address space.

43
New cards

Not Recently Used (NRU) Algorithm

A page replacement algorithm that classifies pages into four classes based on their Referenced (RR) and Modified (MM) bits (00, 11, 22, 33) and evicts a random page from the lowest non-empty class upon a fault.

44
New cards

Clock Page Replacement Algorithm

A realistic approximation of LRU that arranges page frames in a circular list with a moving hand; pages with R=1R = 1 have their bit cleared and are skipped, while the first encountered page with R=0R = 0 is evicted.

45
New cards

Least Recently Used (LRU) Algorithm

A page replacement policy based on the principle of temporal locality that evicts the page that has remained unreferenced for the longest period of time.

46
New cards

Working Set Model

A prepaging model that tracks the set of pages referenced by a process during the most recent kk memory references (or within execution time window τ\tau) to ensure all active pages are in RAM before execution.

47
New cards

WSClock Algorithm

A practical page replacement algorithm combining the clock data structure with working set time stamps and RR/MM status bits to evict unreferenced pages outside the working set window τ\tau.

48
New cards

Thrashing

A state of severe performance degradation where a system spends more time servicing page faults and swapping pages in and out of disk than executing program instructions.

49
New cards

Page Fault Frequency (PFF) Algorithm

A dynamic allocation strategy that monitors a process's page fault rate, increasing its allocated frames if the fault rate exceeds an upper threshold and reducing frames if it falls below a lower threshold.

50
New cards

Copy-on-Write (COW)

An optimization where child and parent processes share physical memory pages marked read-only after a fork()\text{fork}(); a private writable copy is generated for a process only when it attempts to modify a page.

51
New cards

Position-Independent Code (PIC)

Machine code that operates correctly regardless of where it is loaded in memory by using relative branch offsets rather than absolute addresses, allowing multiple processes to share library code across different virtual addresses.

52
New cards

Segmentation

A memory abstraction that provides multiple independent, variable-length linear address spaces (segments) addressed via a two-part address consisting of a segment number and an offset.

53
New cards

i-node

A per-file data structure in UNIX filesystems containing metadata attributes (permissions, owner, size, timestamps) and block disk addresses (direct pointers, single-indirect, double-indirect, and triple-indirect).

54
New cards

File Allocation Table (FAT)

A file system structure where disk blocks are linked via an in-memory table that contains an entry for every disk block, pointing to the next block number in the file's chain or an end-of-file marker.

55
New cards

Contiguous Allocation (File Systems)

A file storage method where each file occupies a single uninterrupted run of consecutive disk blocks, enabling O(1)O(1) random access by simple arithmetic but suffering from external fragmentation.

56
New cards

File Descriptor

A small non-negative integer returned by open()\text{open}() that indexes a per-process open-file table pointing to the kernel's open-file state, current offset, and in-memory i-node.

57
New cards

Mount Point

A directory in the root filesystem tree onto which an independent filesystem on a separate device or disk partition is grafted using the mount\text{mount} utility.

58
New cards

lost+found

A pre-allocated directory created at the root of ext filesystems where the fsck\text{fsck} consistency checker links orphaned files that have valid data but lack any referencing directory entry.

59
New cards

Logical Dump

A backup process that traverses the directory hierarchy from a specified root and uses bitmap tracking to archive only files and directories modified since a specified baseline date.

60
New cards

fsck

A UNIX filesystem consistency check utility that verifies block allocation tables and directory link counts to identify and correct anomalies such as missing blocks, duplicate free blocks, and conflicting file block pointers.