0% found this document useful (0 votes)
3 views4 pages

Study Notes

The document covers key concepts in I/O functions, RAID configurations, buffering, file attributes, and operating system fundamentals. It explains various I/O techniques such as programmed, interrupt-driven, and DMA, and details RAID levels from 0 to 5, highlighting their performance and redundancy characteristics. Additionally, it outlines file management operations and the services provided by operating systems, including memory management, I/O device management, and security.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Study Notes

The document covers key concepts in I/O functions, RAID configurations, buffering, file attributes, and operating system fundamentals. It explains various I/O techniques such as programmed, interrupt-driven, and DMA, and details RAID levels from 0 to 5, highlighting their performance and redundancy characteristics. Additionally, it outlines file management operations and the services provided by operating systems, including memory management, I/O device management, and security.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Unit 5 – I/O, RAID, Buffering & File Management

1. Organization of I/O Functions


I/O functions refer to methods used to transfer data between CPU, memory, and I/O devices (keyboard,
disk, printer, etc.). There are three main techniques:

Programmed I/O
The CPU is fully responsible. It continuously checks (polls) the device status — called busy waiting.
Simple but inefficient as CPU wastes time waiting for slow devices.

Interrupt-Driven I/O
The CPU sends a request and continues other work. When the operation completes, the device sends an
interrupt signal. The CPU executes an Interrupt Service Routine (ISR) and then resumes. Two types:
• Blocking I/O – Process waits until operation completes
• Non-Blocking I/O – Process continues execution

Direct Memory Access (DMA)


A DMA controller transfers data directly between memory and the device without CPU involvement. The
CPU only initialises the transfer. Reduces CPU workload; ideal for large data transfers.

2. RAID (Redundant Array of Independent Disks)


RAID combines multiple physical disks into a single logical unit to improve performance, reliability, and
storage capacity.

RAID 0 – Striping
Data is split into blocks and distributed across disks. Very fast read/write performance. No redundancy —
if one disk fails, all data is lost. Requires at least 2 disks.

RAID 1 – Mirroring
Same data stored on two disks. Complete redundancy — one disk failure is tolerated. Read is faster; write
is slower (both disks written). Uses double storage space.

RAID 2 – Bit-level Striping + ECC


Data striped at bit level; Hamming code used for error detection and correction. High reliability but complex
and rarely used in modern systems.

RAID 3 – Byte-level Striping + Dedicated Parity Disk


Parity calculated per data unit stored on a separate disk. Good for large sequential transfers but all disks
must sync and the parity disk becomes a bottleneck.

RAID 4 – Block-level Striping + Dedicated Parity Disk


Independent block reads from each disk. Single parity disk handles all writes — creates a write bottleneck
for small updates.

RAID 5 – Block-level Striping + Distributed Parity


Parity distributed across all disks, eliminating the bottleneck. Best balance of performance, storage
efficiency, and fault tolerance. Most widely used level.
Quick Summary:
• RAID 0 – Fast, no safety
• RAID 1 – Mirrored copy, safe but costly
• RAID 2 – Bits + ECC (error detect & correct)
• RAID 3 – Bytes + 1 parity disk (bottleneck risk)
• RAID 4 – Blocks + 1 parity disk (independent reads, bottleneck writes)
• RAID 5 – Blocks + distributed parity (best overall)

3. Buffering and Its Types


Buffering temporarily stores data in a memory area (buffer) before processing. It handles the speed
mismatch between fast CPU and slow I/O devices.
Need for buffering: Reduces CPU waiting time, improves performance, increases throughput.

Single Buffer
One buffer used. CPU may wait while buffer is being filled or emptied — limited efficiency.

Double Buffer
Two buffers used alternately. While one is being filled, the other is being processed. Reduces waiting time
through overlapping operations.

Circular Buffer
More than two buffers arranged in a circular manner. Useful for continuous data streams where
uninterrupted processing is required.

4. File Attributes
File attributes are properties (metadata) that describe a file's characteristics.
• Protection – specifies who can access the file
• Owner and Creator – identify the user
• Flags – read-only, hidden, system, archive
• Time attributes – creation time, last access time, last modification time
• Size attributes – current size and maximum size

5. Types of Files
Regular Files
Store user data (text, programs, documents). Treated as a sequence of bytes with no predefined structure.

Directories
Special files used to organise and manage other files. Store file names and their locations.

ASCII Files
Contain human-readable text. Can be edited with any text editor.

Binary Files
Contain machine-readable data. Require specific programs to interpret.
Device Files
• Character special files – byte-by-byte transfer
• Block special files – block-by-block transfer

6. File Operations
Basic Operations
• Create – create a new file and set attributes
• Delete – remove file and free space
• Open – load file attributes into memory
• Close – release resources
• Read – read data from file
• Write – write data to file

Advanced Operations
• Append – add data at end of file
• Seek – change file pointer position
• Get attributes – read file metadata
• Set attributes – modify file properties
• Rename – change file name

Unit 1 – Operating System Fundamentals

1. What is an Operating System?


An Operating System (OS) is software that acts as an interface between the user and computer hardware.
It manages hardware resources and provides services to users and programs.
The OS acts as a Resource Manager (manages CPU, memory, I/O devices) and as an Extended Machine
(hides hardware complexity). Examples: Windows, Linux, Android, macOS.

Types of Operating Systems


Mainframe OS
Used in large organisations for high-volume data processing (banks, airlines, government). Supports batch
processing, transaction processing, and time sharing.

Server OS
Runs on servers; provides shared services (files, printers, web) to multiple users over a network.

Multiprocessor OS
Used in systems with more than one CPU. Allows parallel execution to improve performance and speed.

Personal Computer OS
Designed for a single user on desktops/laptops. Provides a user-friendly interface for everyday tasks.
Examples: Windows, Linux, macOS.
Handheld OS
Used in mobile phones and tablets. Supports touch interface, communication, and multimedia. Examples:
Android, iOS.

Embedded OS
Used in devices like ATMs, printers, washing machines. Performs specific tasks, consumes less memory,
and does not allow user modification.

Real-Time OS (RTOS)
Must respond within a fixed time limit.
• Hard real-time – delay can cause serious damage (e.g., airbags, medical systems)
• Soft real-time – small delay is acceptable (e.g., video streaming)

2. Services Provided by an Operating System


Program Execution
Loads a program into memory, allocates CPU time, executes it, and terminates it safely.

Memory Management
Tracks used and free memory; allocates memory to programs as needed and reclaims it after execution.

I/O Device Management


Controls input/output devices (keyboard, mouse, printer, disk). Acts as a mediator between users and
hardware.

File Management
Manages files and directories — create, delete, read, write, modify. Maintains file structure and organises
data.

Error Detection and Handling


Continuously monitors CPU, memory, and I/O for errors. Takes corrective action to maintain system
stability.

Protection and Security


Protects resources from unauthorised access using authentication mechanisms (passwords, PIN,
fingerprint).

Resource Allocation
Allocates CPU, memory, and devices to processes fairly and efficiently.

Accounting
Tracks system usage (CPU time, memory, device usage) for optimisation and performance analysis.

Communication
Allows processes to communicate via shared memory or message passing — essential in multitasking
systems.

You might also like