Week 7 Flashcards

1
Q

Disk-Space Management

A

Efficient Disk Management:

Allocation methods are crucial to balance space use and performance, much like memory management.
Two main strategies:
Allocate n consecutive bytes for an n-byte file.
Split files into smaller blocks, which may be non-contiguous.

Block Size:
Block size affects performance and utilization:
Large blocks increase data rate but waste space if underutilized.
Small blocks reduce wasted space but add latency.

Free Block Tracking:
Linked List: Maintains free blocks using pointers but adds space overhead.
Bitmap: Uses bits to indicate block availability, saving space but needing more frequent updates.

Disk Quotas:
Quotas in multiuser systems ensure fair resource allocation, tracking disk usage per user to prevent excessive use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

File System Backups and Consistency

A

Backups:
Regular backups prevent catastrophic data loss, with strategies like:
Incremental Backups: Back up only changes since the last backup to save time and space.
Compression: Reduces backup size.

Consistency Checks:
Utilities (e.g., fsck on UNIX, sfc on Windows) identify and repair file system inconsistencies.
Journaling: Logs intended actions before execution, enabling recovery after unexpected shutdowns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

File-System Performance

A

Caching and Write Strategies:
Write-Through Cache: Writes data immediately to disk, reducing data loss risks.
Buffer Cache: Temporarily stores disk blocks in memory, combining with paging for fast access.

Read-Ahead Strategy:
Preloads subsequent blocks during sequential reads to boost cache efficiency.

Modified LRU:
Evicts less-likely-to-be-needed blocks first while prioritizing critical block writes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Input/Output Hardware

A

Device Types:
Block Devices: Fixed-size addressable blocks, typical for storage (e.g., hard drives).
Character Devices: Stream-based, handling one character at a time (e.g., keyboards, printers).

Device Controllers:
Interfaces between the CPU and devices, responsible for tasks like converting data formats, error correction, and sending data to main memory.

Memory-Mapped I/O:
Devices share address space with memory, using control registers mapped directly into memory space for easy access.

Direct Memory Access (DMA):
Allows devices to transfer data directly to memory without CPU involvement, increasing efficiency, especially in multi-channel DMA setups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

I/O Hardware

A

Block vs. Character Devices:
Block Devices: Use fixed-size blocks with addresses and allow independent read/write operations (e.g., storage devices).
Character Devices: Stream data without addressability (e.g., printers, keyboards).

Direct Memory Access (DMA):
Purpose: Reduces CPU involvement in data transfer, allowing data to move directly between I/O devices and memory.
Types:
Single Transfer DMA: Manages one data transfer at a time.
Multi-Channel DMA: Supports multiple concurrent transfers, increasing efficiency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

I/O Management in Operating Systems

A

Complex Device Interfaces:
OS abstracts complex, low-level hardware interfaces, simplifying access for users.
Device Driver Structure:

Components:
Upper Half: Handles I/O requests from processes.
Lower Half: Activated by interrupts from devices, completing I/O tasks.

Abstractions:
Interface Abstraction: Provides a consistent I/O interface, balancing simplicity, flexibility, and efficiency.
Driver Abstraction: Addresses different needs (e.g., synchronous vs. asynchronous I/O).
Open-Read-Write-Close Paradigm: Standardized operations for I/O interaction, making devices accessible through a unified API (e.g., Unix treats devices as “files”).

Memory-Mapped I/O:
Maps device control registers into the memory address space, allowing efficient communication between CPU and devices.
Used in systems like x86 with protected spaces for device data and I/O ports.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Understanding Interrupts

A

Interrupt Handling:
Process: An I/O device signals when it finishes its task, triggering an interrupt.
Handling Steps:
The interrupt controller checks priority, signals the CPU, which pauses its current task.
The CPU fetches a new program counter to handle the interrupt, then resumes its previous task after completion.

Interrupt Vector:
A table that guides the CPU to handle various types of interrupts.
The CPU temporarily prevents other interrupts during processing, preserving system stability.

Types of Interrupts:
Trap: A deliberate interrupt triggered by the program.
Fault/Exception: An unintentional interrupt triggered by errors in program execution (e.g., division by zero).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly