TANZANIA METEOROLOGICAL AUTHORITY
M
NATIONAL METEOROLOGICAL TRAINING CENTER
DEPARTMENT OF INFORMATION AND COMMUNICATION TECHNOLOGY (ICT)
TECHNICIAN CERTIFICATE IN INFORMATION AND
COMMUNICATION TECHNOLOGY (ICT)
ACADEMIC YEAR:2025/2026
MODULE CODE: ITT05107
MODULE NAME: FUNDAMENTAL OF OPERATING
SYSTEM
SUBMITTED DATE: 29 JAN 2026
QN,01: Explain in detail the structure of disk, memory and directories as used in
operating system. Your answer should cover disk organization, memory structure,
directory structure and how these components support efficient process execution
and space management.
INTRODUCTION
Operating systems are the system that act as an interface between computer hardware
and user. Its primary role is to manage hardware resources efficiently and provide a
suitable environment for program execution. Among the most critical resources
managed by an operating system are disk storage, main memory, and directories.
The structure and organization of these components greatly influence system
performance, process execution efficiency, and space utilization.
OR
An operating system (OS) is essential system software that manages a computer's
hardware, software resources, and provides common services for computer
programs. It acts as an intermediary between users and hardware, handling tasks like
memory management, process scheduling, file system management, and security.
Key components include kernels, shell, and device drivers. Also, there is a common
operating system such as windows, Linux, MacOS. But operating systems perform
different functions such as
i. Process Management: Manages the CPU by allocating resources to various
applications, enabling multitasking.
2
ii. Memory Management: Controls and coordinates computer memory (RAM),
tracking which parts are in use and by whom.
iii. File System Management: Organizes, stores, and manages data, including
file creation, deletion, and directory structures.
iv. Device Management: Uses drivers to manage input/output devices like
keyboards, monitors, and printers.
v. User Interface (UI): Provides a way for users to interact with the device, such
as a Graphical User Interface (GUI) or Command-Line Interface (CLI).
vi. Security: Protects data and resources from unauthorized access and manages
user permissions.
Figure 1: Image shows examples of an operating system
1.0: DISK STRUCTURE AND ORGANIZATION
Disk structure refers to the physical composition of storage (platters, tracks, sectors,
cylinders) while organizational structure dictates the logical layout (file systems,
partitions, directories). Physically, disks use spinning magnetic platters with
read/write heads. Logically, they are organized via systems like NTFS or FAT to
manage data, partitions, and boot sectors for OS access.
3
1.1 Disk Structure (Physical)
✓ Platters & Spindle: Circular, magnetic, rotating disks (platters) mounted on
a spindle, with two surfaces each used for data storage.
✓ Tracks: Concentric circles on the platter surface.
✓ Sectors: Tracks are divided into sectors, the smallest physical storage units
(typically 512 bytes or 4 KB).
✓ Cylinders: The set of corresponding tracks across all surfaces of a multi-
platter disk, reducing read/write head movement.
✓ Read/Write Heads: Components that move across surfaces to read/write
data, assembled on an arm.
Figure 2: An image shows the structure of a disk
4
Figure 3: An image shows the physical of a disk
1.2: Organizational Structure (Logical)
▪ Partitions: Division of a physical disk into distinct logical sections, allowing
for independent file systems.
▪ File System: Methods (e.g., FAT32, NTFS, UFS) for organizing, naming,
storing, and retrieving files.
▪ Boot blocks: Special sectors (like the MBR - Master Boot Record) that
contain the code to load the OS, essential for making a disk bootable.
▪ Directories: Hierarchical structures that map file names to physical disk
locations, enabling file organization.
▪ Data area: The largest portion of the disk, where actual user files and folders
reside.
5
Figure 4: An image shows the logical structure
1.3: Disk scheduling
Disk scheduling in operating systems is the method used to manage and order I/O
requests (read/write) for a disk, aiming to minimize seek time, reduce rotational
latency, and maximize throughput. It prevents starvation by organizing queue
requests, which is crucial for efficient data access, particularly for hard drives.
Common algorithms include FCFS, SSTF, SCAN, and C-SCAN.
Figure 5: An image shows disk scheduling
6
Key Concepts in Disk Scheduling
▪ Seek Time: The time required to move the disk arm to the desired
cylinder/track. This is the primary target for optimization.
▪ Rotational latency: The time taken for the desired sector to rotate under the
read/write head.
▪ Transfer Time: Time to transfer data.
• Disk access Time: Sum of Seek Time, Rotational Latency, and Transfer
Time.
Common Disk Scheduling Algorithms
1. FCFS (First-Come, First- served: Requests are served in the order they
arrive. It is simple but often inefficient, as it can cause high seek times.
2. SSTF (Shortest Seek Time First: Services the request closest to the current
disk head position, minimizing seek time but potentially causing starvation
for distant requests.
3. SCAN (Elevator Algorithm): The head moves in one direction to the end of
the disk, servicing requests, then reverses direction.
4. Circular SCAN: Similar to SCAN, but only services requests in one
direction. Upon reaching the end, it returns to the beginning without servicing
requests, providing a more uniform wait time.
5. LOOK/C- LOK: Like SCAN/C-SCAN, but the head only travels as far as
the last request in each direction rather than going to the very edge of the disk.
Goals of Disk Scheduling
i. Minimize Seek Time: Efficiently move the disk arm to reduce waiting.
ii. Maximize Throughput: Increase the number of I/O requests handled in each
time.
iii. Reduce Response Time: Lower the average time spent by each request in
the queue.
1.4: Disk space management
7
Disk space management in an OS
Involves managing, partitioning, and allocating storage space on drives,
utilizing techniques like file allocation, free space tracking and disk
scheduling to maximize efficiency and performance. Key operations include
partitioning, formatting, defragmentation, and using tools like Windows Disk
Management to initialize, extend, or shrink volumes.
Key Aspects of Disk Space Management
1. Disk partionaning: Dividing a physical disk into multiple logical sections
(e.g., C: and D: drives) for better organization and data isolation.
2. Formatting: Preparing a partition to hold files by creating a file system
(NTFS, FAT32, ext4).
3. Free space Management: The OS tracks available space using methods such
as:
▪ Bit Vector (Bitmap): Each block is represented by a 0 (allocated) or 1
(free).
▪ Linked List: Free blocks are linked together, with the pointer to the
first block stored.
▪ Grouping: The first free block stores the addresses of other free blocks.
▪ Counting: Stores the address of the first free block and the number of
contiguous free blocks.
Space Allocation method used:
▪ Contiguous: Files are stored in continuous blocks.
▪ Linked: Files are stored as a linked list of blocks.
▪ Indexed: A file's blocks are tracked using an index block.
▪ Disk optimization: Defragmentation rearranges scattered data into
contiguous blocks to improve read/write speed.
▪ Motoring and tools: Systems use tools like Windows
2.0: MEMORY STRUCTURE IN OPERATING SYSTEM
8
Memory structure in operating systems is a hierarchical, managed layout
ranging from fast CPU registers/aches to slower RAM and storage, designed
to optimize data access. The OS manages this via partitioning, paging, and
segmentation, allowing for efficient process execution and space management
by mapping logical to physical addresses, utilizing virtual memory, and
protecting memory regions.
Figure 6: An image shows the structure of memory in operating system
The memory structure in operating system
The memory hierarchy is designed to balance speed, capacity, and cost.
i. Registers & Cache: Smallest, fastest, and closest to the CPU.
ii. Main Memory (RAM): Directly accessible by the CPU, holding active
processes.
iii. Secondary Storage: Large, slow (hard drives/SSDs) holding inactive
data/programs.
9
The OS ensures CPU efficiency by keeping active data in high-speed memory
and using specialized techniques:
i. Memory Hierarchy: Cache memory stores frequently access data, reducing
CPU idle time while waiting for data from slow disk storage.
ii. Virtual memory: Allows execution of processes larger than physical RAM
by swapping unused data to secondary storage, facilitating multitasking.
iii. Context: Efficiently swapping processes into and out of RAM, managed by
the OS to keep the CPU busy.
Base and limit Register: These provide hardware-based protection to ensure a
process cannot access memory outside its allocated space, maintaining system
The OS manages the limited space in RAM to avoid waste and fragmentation:
Summary of Memory Management Techniques
Technique Description Efficient resource usage
Paging Memory broken into Eliminates external
fixed-size blocks fragmentation
(pages/frames)
Segmentation Memory divided into Allows flexible, logical
logical modules memory allocation
Swapping Moving processes Enables running more
between RAM and programs than available RAM.
disk.
Virtual Memory Using disk space as Allow large applications to
RAM. run.
3: DIRECTORY STRUCTURE
A directory structure in an operating system is a hierarchical, tree-like
organization of files and folders, starting from a root directory to manage data
efficiently. It facilitates fast file access, reduces naming conflicts, and
optimizes storage, supporting efficient process execution through organized,
rapid file retrieval and better space management via structured allocation.
Directory structure in operating systems
10
• Tree structure: The most common structure, allowing directories to contain
files and subdirectories, providing efficient organization, searching, and
grouping.
• Root and subdirectories: The structure starts with a root, followed by nested
subdirectories, creating a logical hierarchy (e.g., /home/user/documents).
• Naming and Access: Files with the same name can exist in different
directories, preventing conflicts and improving user organization.
• Types: Includes Single level (all files together), Two-level (one directory per
user), Hierarchical (tree), and Acyclic Graph (allows sharing of
subdirectories.
The integration of disk, memory, and directories is a fundamental function of an
operating system (OS) that enables efficient process execution and optimal space
management. The OS acts as a bridge, utilizing directories to organize
data, disks to provide large, persistent, non-volatile storage, and memory (RAM) to
provide fast, temporary storage for active execution.
1. Integration of Disk, Memory, and Directories
The OS integrates these components through a hierarchical structure that manages
file access and data movement:
11
i. Directories (File System Structure): Directories, or folders, act as a logical
organizational system, mapping human-readable filenames to specific,
fragmented locations on the physical disk.
ii. Disk (Secondary Storage): The file system organizes the physical disk into
sectors/clusters and maintains a free-space list (e.g., bitmap or linked list) to
track used and available space, handling fragmented files.
iii. Memory (Primary Storage): The OS acts as a mediator, loading executable
code from the disk into memory for CPU access.
iv. Virtual Memory/Swapping: The OS integrates disk and memory by treating
a portion of the disk (swap space) as an extension of RAM, enabling systems
to run programs larger than the available physical memory.
2. Supporting Efficient Process Execution
The OS maximizes CPU efficiency by ensuring it rarely waits for slow disk I/O,
utilizing several techniques:
i. Paging and Demand Paging: Programs are broken into smaller chunks
(pages). The OS loads only the necessary pages into RAM rather than the
entire program, significantly speeding up application startup.
ii. Process Scheduling & Context Switching: The OS schedules processes run
on the CPU. While a process waits for I/O (file access on disk), the OS swaps
it out to allow another process to use the CPU.
iii. Disk Caching: Frequently accessed data from the disk is kept in a dedicated
portion of RAM (disk cache). Subsequent requests are served from fast RAM,
reducing disk seek time.
iv. Buffering: The OS uses memory buffers to hold data during transfer between
disks and processes, smoothing out the speed differences between them.
3. Supporting Efficient Space Management
The OS ensures that space, both in memory and on disk, is not wasted:
A. Free Space Management (Disk): The OS uses bitmaps (1 for free, 0 for
allocated) or free-block lists to track available space.
12
B. Defragmentation: Over time, files become scattered. The OS reorganizes
these fragments into contiguous blocks, reducing disk head movement and
improving speed.
C. Contiguous vs. Non-Contiguous Allocation: While contiguous allocation is
fast, modern systems use indexed or linked allocation to handle file growth
and prevent external fragmentation (wasted gaps between files).
D. Memory Paging/Segmentation: To avoid memory fragmentation, the OS
divides memory into fixed-size frames (paging) or logical segments
(segmentation), allowing for non-contiguous, efficient memory allocation.
E. Dynamic Partitioning: In memory, the OS allocates only the required
amount of memory, reducing internal fragmentation.
Component Function Contribution to
Efficiency
Directory Naming & Organization Rapid file
locating, logical
structuring.
Disk Persistent Storage Large, cheap
capacity for long-
term storage.
Memory Fast Execution Area High-speed data
access for the
CPU.
Integration Paging/Swapping/Caching Hides slow disk
speed, maximizes
RAM usage.
13
Figure 7: Images show an example of integration
CONCLUSION
The integration of disk, memory, and directories is a fundamental function of an
operating system (OS) that enables a computer to efficiently execute applications,
manage resources, and maintain data integrity. The operating system acts as a
mediator, transforming raw storage (disk) and limited, fast access memory (RAM)
into a usable, organized, and high-performance environment.
14