1. Introduction to Operating System
An Operating System (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.
Examples: Windows, Linux, macOS, Android, iOS.
2. Functions of OS
- Process Management: Creating, scheduling, and terminating processes.
- Memory Management: Allocating and deallocating memory to processes.
- File Management: Creating, deleting, and organizing files.
- Device Management: Managing I/O devices through drivers.
- Security: Protecting resources from unauthorized access.
- User Interface: Providing CLI or GUI.
3. Types of Operating Systems
| Type | Description | Example |
|---|---|---|
| Batch OS | Jobs with similar needs grouped together | Early IBM systems |
| Time-sharing OS | CPU time shared among multiple users | UNIX, Linux |
| Real-time OS | Guarantees response within fixed time | VxWorks, QNX |
| Distributed OS | Multiple computers work as one | Linux cluster |
| Network OS | Manages network resources | Windows Server |
| Mobile OS | Designed for mobile devices | Android, iOS |
4. Process Management
A process is a program in execution. The OS manages processes through:
- Scheduling: Deciding which process runs next.
- Context Switching: Saving and restoring process state.
- IPC: Inter-process communication.
5. Memory Management
The OS handles memory allocation using techniques like:
- Contiguous Allocation: Each process gets a single block.
- Paging: Divides memory into fixed-size pages.
- Segmentation: Divides memory into variable-sized segments.
- Virtual Memory: Uses disk space as extension of RAM.
6. File Management
The OS organizes files into directories with attributes (name, size, type, permissions, creation date). Common file systems: NTFS (Windows), ext4 (Linux), APFS (macOS).
7. Popular Operating Systems
- Microsoft Windows: Most widely used desktop OS.
- Linux: Open-source, widely used for servers.
- macOS: Apple's desktop OS.
- Android: Most popular mobile OS (Linux-based).
- iOS: Apple's mobile OS.
8. Revision Questions and Answers
Very Short Answer Questions
1. What is an operating system?
System software that manages hardware and software resources.
2. Name any two functions of an OS.
Process management and memory management.
3. Which OS is most widely used on desktops?
Microsoft Windows.
4. What is a process?
A program in execution.
5. What is virtual memory?
Using disk space as an extension of RAM.
Short Answer Questions
1. Differentiate between time-sharing and real-time OS.
Time-sharing OS divides CPU time among multiple users (e.g., Linux). Real-time OS guarantees response within fixed time (e.g., VxWorks used in medical devices).
2. Explain process scheduling.
Scheduling decides which process gets CPU time. Types: FCFS (First Come First Serve), SJF (Shortest Job First), Round Robin, Priority scheduling.
Long Answer Questions
1. Explain the key functions of an operating system in detail.
The OS performs: (1) Process management — creating/scheduling/terminating processes. (2) Memory management — allocating memory to processes. (3) File management — organizing files with directory structure. (4) Device management — controlling I/O through drivers. (5) Security — user authentication, access control. (6) User interface — providing CLI or GUI for user interaction.