Operating Systems: Files, I/O, and Deadlocks

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

1/74

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering files and file systems, input/output (I/O), and deadlocks based on Tanenbaum's Modern Operating Systems study guide.

75 Terms

1
New cards

File

A collection of related information stored on secondary storage and treated as a single unit by the operating system.

2
New cards

File Abstraction

The operating system model that hides hardware details and presents files to users as a named sequence of bytes.

3
New cards

File Name

A symbolic identifier used by humans to identify a file.

4
New cards

File Extension

A suffix added to a file name that often indicates the file type (e.g., .txt for text, .c for C source code, .exe for executable).

5
New cards

File Attributes

Metadata stored separately from actual file contents, including attributes such as name, owner, size, permissions, timestamps, and disk block location.

6
New cards

File Descriptor

A handle returned by the open system call used to manipulate and reference an open file.

7
New cards

Create (File Operation)

A system call that creates an empty file on secondary storage.

8
New cards

Open (File Operation)

A system call that retrieves file information and returns a file descriptor for subsequent operations.

9
New cards

Read (File Operation)

A system call that moves data from disk into memory.

10
New cards

Write (File Operation)

A system call that copies data from memory to a file on disk.

11
New cards

Append (File Operation)

A file operation that adds data specifically to the end of a file.

12
New cards

Seek (File Operation)

A system call that moves the file pointer to allow random access within a file.

13
New cards

Close (File Operation)

A system call that releases the operating system resources associated with an open file.

14
New cards

Byte Stream Files

A file organization method where the operating system sees data strictly as an unformatted sequence of bytes, commonly used by UNIX systems.

15
New cards

Record-Oriented Files

A file organization method where data is organized into structured records, typically found in database systems.

16
New cards

Directory

A special file containing mappings from filenames to file metadata.

17
New cards

Single-Level Directory

A directory system where all files are stored in a single root directory, which leads to file name conflicts and poor scalability.

18
New cards

Two-Level Directory

A directory structure with separate directories for each user, allowing different users to use identical file names.

19
New cards

Tree-Structured Directory

A hierarchical directory structure used in modern systems that provides organized branching and easier navigation.

20
New cards

Acyclic Graph Directory

A directory structure that supports file sharing by allowing multiple directories or users to reference the same files.

21
New cards

File Control Block (FCB)

A structure maintained by the file system for every file that stores metadata including owner, permissions, size, timestamps, and disk addresses.

22
New cards

Inode

The UNIX equivalent of a File Control Block (FCB\text{FCB}) that stores file metadata and disk block pointers, but does not contain the filename.

23
New cards

Inode Structure

The internal contents of an inode, which include owner ID, group ID, access mode, file size, and block pointers.

24
New cards

Contiguous Allocation

A file allocation method where file blocks are stored in consecutive disk sectors, providing excellent sequential performance but suffering from external fragmentation.

25
New cards

External Fragmentation

A disadvantage of contiguous allocation where free disk space is divided into scattered pieces, making file growth and new allocations difficult.

26
New cards

Linked Allocation

A file allocation method where each block contains a pointer to the next block, eliminating external fragmentation but causing poor random access and pointer overhead.

27
New cards

Pointer Overhead

The extra storage space consumed by storing disk address pointers within each data block in linked allocation.

28
New cards

Indexed Allocation

A file allocation method where a dedicated index block stores all pointers to a file's data blocks, providing direct access without external fragmentation.

29
New cards

Index Block

A separate disk block in indexed allocation that stores pointers to all data blocks belonging to a file.

30
New cards

Bitmap (Free Space Management)

A free-space tracking method using an array of bits where a value of 11 indicates a used block and 00 indicates a free block.

31
New cards

Linked List of Free Blocks

A free-space management method where unused disk blocks are chained together via pointers, requiring less memory overhead but resulting in slower searches.

32
New cards

Consistency Checking

A verification process by the operating system that checks block ownership, directory correctness, and allocation consistency to repair damage.

33
New cards

fsck

A UNIX utility used for file system consistency checking and repair.

34
New cards

chkdsk

A Windows utility used for file system consistency checking and repair.

35
New cards

I/O Devices

Hardware components that enable communication between a computer system and its external environment.

36
New cards

Device Controller

An electronic intermediary between the CPU and a physical device that handles low-level hardware operations.

37
New cards

Block Devices

I/O devices (such as hard disks and SSDs) that store information in fixed-size blocks and allow independent access to each block.

38
New cards

Character Devices

I/O devices (such as keyboards, printers, and serial ports) that deliver or accept a continuous stream of characters without fixed block formatting.

39
New cards

Programmed I/O

An I/O method where the CPU directly controls transfers and repeatedly checks the device status, wasting CPU cycles in busy-waiting.

40
New cards

Polling

The repetitive testing of a device's status register by the CPU (such as while(status != READY)) to wait until the device is ready.

41
New cards

Interrupt-Driven I/O

An I/O method where the CPU initiates an operation and performs other work until the device notifies completion via a hardware interrupt.

42
New cards

Interrupt Handler

A specialized operating system routine that saves CPU state, determines the interrupt source, services the device, and restores execution.

43
New cards

Direct Memory Access (DMA)

A high-performance I/O technique where a controller transfers data directly between a device and memory without requiring the CPU to copy every byte.

44
New cards

Device Driver

Device-specific software responsible for hardware initialization, command translation, error handling, and data transfer for a controller.

45
New cards

Device-Independent I/O Software

An operating system software layer that provides uniform I/O functions including naming (e.g., /dev/sda), protection, buffering, and device allocation.

46
New cards

Buffering

The use of a temporary memory area during data transfers to absorb speed differences between producer and consumer devices.

47
New cards

Single Buffer

A buffering scheme where data is transferred between a device and a process through a single shared memory area.

48
New cards

Double Buffering

A buffering scheme that uses two buffers so a device can transfer data into one buffer while a process reads from the other, enabling overlap.

49
New cards

Caching

A performance technique that stores recently used data in fast memory to reduce access latency for future requests.

50
New cards

FCFS Disk Scheduling

First-Come, First-Served disk scheduling algorithm that services requests in the exact order of their arrival, which is fair but inefficient.

51
New cards

SSTF Disk Scheduling

Shortest Seek Time First disk scheduling algorithm that selects the request closest to the current head position, reducing seek movement but risking starvation.

52
New cards

SCAN Disk Scheduling

An elevator-based disk scheduling algorithm where the disk arm moves in one direction servicing requests until it reaches the edge, then reverses.

53
New cards

LOOK Disk Scheduling

A variation of SCAN disk scheduling that moves the head only as far as the final request in each direction before reversing, avoiding unnecessary travel to the disk edge.

54
New cards

C-SCAN Disk Scheduling

Circular SCAN disk scheduling algorithm that services requests in only one direction and returns immediately to the beginning, providing uniform waiting times.

55
New cards

Seek Time

The time required for the disk arm to move to the desired track.

56
New cards

Rotational Latency

The time spent waiting for the target sector to rotate under the read/write head.

57
New cards

Turnaround Time

The total elapsed time from the submission of a process to its complete execution.

58
New cards

Interrupt

A signal causing the CPU to temporarily suspend execution of the current program and service an event.

59
New cards

Deadlock

A situation where a set of processes is permanently blocked because each process is waiting for an event that only another process in the set can cause.

60
New cards

Resource Allocation Graph

A directed graph used to model deadlocks, with circles representing processes, squares representing resources, and directed edges indicating requests or assignments.

61
New cards

Request Edge

A directed edge (P→RP \rightarrow R) in a resource allocation graph indicating that process PP is requesting resource RR.

62
New cards

Assignment Edge

A directed edge (R→PR \rightarrow P) in a resource allocation graph indicating that resource RR has been allocated to process PP.

63
New cards

Coffman Conditions

The set of 44 conditions (Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait) that are all necessary for a deadlock to occur.

64
New cards

Mutual Exclusion (Coffman Condition)

A necessary deadlock condition stating that only one process can use a given non-shareable resource at a time.

65
New cards

Hold and Wait (Coffman Condition)

A necessary deadlock condition where a process currently holding resources is waiting to acquire additional resources held by other processes.

66
New cards

No Preemption (Coffman Condition)

A necessary deadlock condition stating that resources cannot be forcibly removed from a process and must be released voluntarily.

67
New cards

Circular Wait (Coffman Condition)

A necessary deadlock condition where processes form a closed cycle such that each process is waiting for a resource held by the next process.

68
New cards

Deadlock Prevention

A deadlock management strategy that breaks at least one of the 44 Coffman conditions so that deadlocks are structurally impossible.

69
New cards

Deadlock Avoidance

A dynamic strategy that regulates resource allocation by ensuring the operating system never enters an unsafe state.

70
New cards

Safe State

A system state in which there exists at least one order of process execution that allows all processes to finish without deadlocking.

71
New cards

Unsafe State

A state with no guaranteed completion sequence; it is not yet deadlocked, but may lead to a deadlock.

72
New cards

Banker's Algorithm

A deadlock avoidance algorithm that evaluates whether resource allocations leave the system in a safe state, named after a banker ensuring loans can always be repaid.

73
New cards

Need Formula (Banker's Algorithm)

The formula used to calculate a process's remaining resource requirements: Need=Max−AllocationNeed = Max - Allocation.

74
New cards

Deadlock Detection

A strategy where deadlocks are permitted to occur and the operating system periodically inspects resource graphs or matrices to discover deadlock cycles.

75
New cards

Resource Preemption (Deadlock Recovery)

A deadlock recovery method where allocated resources are forcibly taken away from a process, requiring checkpointing, rollback, and restart.