
What is the use of an Operating System ? What are various types of operating systems? Explain the working of any one operating system.
Operating System (OS)
1. What is the use of an Operating System?
An Operating System is a system software that acts as an interface between the user and the computer hardware.
Without an OS, the computer is just a collection of hardware devices that cannot be used easily. Types of operating system
Main uses / functions of an OS:
- Resource Management
- Manages all hardware resources: CPU, memory, hard disk, I/O devices, etc.
- Decides which process gets CPU, how much memory is allocated, etc.
- Process Management
- Creates, schedules, and terminates processes/programs.
- Uses algorithms (like FCFS, Round Robin etc.) to decide the order in which processes will run.Types of operating system
- Memory Management
- Keeps track of which part of memory is used by which program.
- Allocates and deallocates memory space to programs.
- Prevents one program from accessing the memory of another program. Types of operating system
- File Management
- Manages files and folders on storage devices.
- Provides operations like create, delete, read, write, copy, move, rename files.
- Maintains file attributes, permissions, and protection.
- Device Management
- Controls and coordinates input/output devices (keyboard, mouse, printer, etc.).
- Uses device drivers so that hardware can communicate with the OS and applications. Types of operating system
- User Interface
-
Provides interface to interact with computer:
- CLI (Command Line Interface) – e.g., MS-DOS, Linux terminal
- GUI (Graphical User Interface) – e.g., Windows, Android
- Makes the system user-friendly.
-
Provides interface to interact with computer:
- Security and Protection
- Protects data and resources from unauthorized access.
- Uses password, permissions, access control, encryption, etc.
- Error Detection and Handling
- Continuously checks for errors in CPU, memory, I/O devices, etc. Types of operating system
- Takes corrective actions or shows suitable error messages.
- Job / Task Management and Multitasking
- Handles multiple tasks together (e.g., playing music while downloading files).
- Improves CPU utilization and system performance.
2. Various types of Operating Systems
Operating systems can be classified in different ways. Important types are:
- Batch Operating System
- Time-Sharing Operating System
- Multiprogramming Operating System
- Multiprocessing Operating System
- Real-Time Operating System (RTOS)
- Distributed Operating System
- Network Operating System
- Single-User and Multi-User Operating System
- Embedded and Mobile Operating Systems
Now briefly explain each:
2.1 Batch Operating System
- Jobs of similar type are collected and processed in batches.
- No direct interaction with the computer by the user. Types of operating system
- Used in early mainframe systems for payroll processing, bill generation, etc.
2.2 Time-Sharing Operating System
- Allows multiple users to use the computer at the same time.
- CPU time is divided into small time slices and given to each user/program.
- Provides quick response and supports interactive computing.
2.3 Multiprogramming Operating System
- Multiple programs are kept in memory at the same time. Types of operating system
- When one program is waiting for I/O, the CPU executes another program.
- Increases CPU utilization and overall system efficiency.
2.4 Multiprocessing Operating System
- The system has more than one CPU (processors).
- Tasks can be divided among processors to increase speed and reliability.
- Used in high-performance and server systems. Types of operating system
2.5 Real-Time Operating System (RTOS)
- Responds to input within a very small and fixed time limit.
-
Used in systems where delay can cause failure:
– air traffic control, medical equipment, industrial control, etc. - Can be hard real-time or soft real-time.
2.6 Distributed Operating System
- A group of physically separate computers work together and appear as a single system to the user.
- Resources are shared over the network.
- Example uses: cluster systems, distributed databases. Types of operating system
2.7 Network Operating System
- Runs on a server and manages network resources.
- Provides services like file sharing, printer sharing, user management over a network.
- Examples: early versions of Novell NetWare, some Windows Server editions. Types of operating system
2.8 Single-User and Multi-User OS
- Single-User OS: Only one user can use the system at a time (e.g., early MS-DOS).
- Multi-User OS: Many users can work simultaneously (e.g., Unix, Linux, mainframe OS).
2.9 Embedded and Mobile OS
- Embedded OS: Designed for specific devices like washing machines, routers, smart TVs.
- Mobile OS: Designed for smartphones and tablets like Android, iOS.
3. Working of any one Operating System
Let’s explain the working of a Time-Sharing Operating System, because modern OS like Windows, Linux, macOS follow this concept.
3.1 Idea of Time-Sharing OS
- Many users/programs want to use the CPU.
- OS gives each program a small time slice of CPU (for example, a few milliseconds). Types of operating system
- OS switches CPU rapidly from one program to another.
- Because switching is so fast, users feel that their program is running continuously.
3.2 Working of Time-Sharing OS – Step-wise
- User submits programs (jobs/programs/processes)
- Many users log in and start programs (like editor, compiler, browser).
- Each running program is called a process.
- OS stores all processes in memory / ready queue
- The OS keeps information about each process in a Process Control Block (PCB).
- All processes that are ready to run are kept in a ready queue.
- CPU scheduling
- The OS uses a scheduling algorithm (e.g., Round Robin).
- It selects one process from the ready queue and gives it the CPU for a time quantum (time slice). Types of operating system
- Process executes for one time slice
- During its time, the process performs instructions like calculations, I/O requests, etc.
- If it needs I/O (like reading from disk), it may block, and the OS will give CPU to another process.
- Timer interrupt and context switching
- A hardware timer is set for the time slice.
- When the time slice finishes, a timer interrupt occurs.
-
The OS then:
- Saves the current process state (registers, program counter, etc.) – this is called context.
- Place this process back in the ready queue if it is not finished.
- Selects the next process from the ready queue.
- Loads its saved context and gives it the CPU.
- This process is called context switching.
- Multiprogramming + Time-sharing together
- While one process waits for I/O, another process uses the CPU.
- CPU is almost never idle, leading to high utilization.
- User interaction and quick response
-
Because each process gets frequent time slices, users feel that:
- their program responds quickly
- They are working on the computer alone, even though many others are also logged in.
- This gives a feeling of simultaneous usage.
-
Because each process gets frequent time slices, users feel that:
- Completion and termination
-
When a process finishes its work:
- OS frees its memory and resources.
- Removes its PCB from the system.
- The CPU schedule continues with remaining processes.
-
When a process finishes its work:
3.3 Advantages of Time-Sharing OS
- Efficient use of CPU – CPU rarely remains idle.
- Improved response time – suitable for interactive users.
- Supports multiple users – many users can log in and work at the same time.
- Better resource sharing – CPU, memory, and devices are shared among users. Types of operating system
Summary
- Use of OS: Interface between user and hardware, manages resources (CPU, memory, files, devices), provides security, user interface, error handling, multitasking, etc.
- Types of OS: Batch, Time-Sharing, Multiprogramming, Multiprocessing, Real-Time, Distributed, Network, Single-User/Multi-User, Embedded/Mobile.
- Working (Time-Sharing OS):
- Many users/programs are stored in memory.
- Scheduler gives each process a small time slice.
- Timer interrupt causes context switch to the next process.
- Users feel that their programs run continuously and get quick response.
If you must know the Syllabus of Computer Fundamentals you must visit the official website of Gndu.
👉 Note:- Important questions of Computer Fundamental
