Muhammad Shawaiz OSAssignment#1
Muhammad Shawaiz OSAssignment#1
Assignment # 01
Operating System Structure
1. Main Components of an Operating System
An Operating System (OS) is software that helps manage computer hardware and software,
ensuring that everything runs smoothly. It provides essential services to other programs and
helps them communicate with the hardware. The main parts of an operating system include
the kernel, process management, memory management, file system management, device
management, and security and protection.
The Kernel
The kernel is the core part of the operating system, acting as the middle layer between
hardware and software. It’s responsible for controlling system resources and making sure that
hardware and software work together.
Process Management
Process management is all about handling processes, which are programs that are running.
The OS is in charge of making sure each process runs smoothly and in an organized manner,
allowing multitasking where several processes run simultaneously.
Memory Management
Memory management makes sure that the system's memory (RAM) is used efficiently. The
OS assigns memory to processes and ensures data is stored properly.
Key Functions of Memory Management:
• Memory Allocation: Allocates memory to processes as needed during execution.
• Virtual Memory: Extends RAM by using hard disk space when memory is
insufficient.
• Paging & Segmentation: Organizes memory into small, fixed-size units (pages) or
larger, flexible segments to reduce fragmentation.
• Swapping: Moves inactive processes from RAM to the hard drive when memory is
running low.
Device Management
Device management controls hardware devices connected to the computer, such as
input/output devices.
Microkernel
In a microkernel, only the essential services (like CPU scheduling and memory
management) run in the kernel space, while other services run in user space.
• Advantages: More modular and secure because errors in one part don’t crash the
whole system.
• Disadvantages: Slower performance due to more context switching.
• Examples: QNX, Minix.
Hybrid Kernel
A hybrid kernel combines the features of both monolithic and microkernels. Some services
run in the kernel space while others run in the user space.
• Advantages: Offers the performance of a monolithic kernel with the modularity of a
microkernel.
• Disadvantages: More complex to design and maintain.
• Examples: Windows NT, macOS.
Memory Management
The OS uses techniques like paging (dividing memory into small, fixed-size units) and
segmentation (dividing memory into variable-size segments) to organize memory. Virtual
memory extends the available memory by using disk space, allowing processes to run
efficiently even if the physical RAM is limited.
Summary of OS Types
Type Key Features Examples
Distributed OS Resource sharing across multiple machines Google Cloud, Apache Hadoop