The main tasks or functions of an operating system are the essential services it provides to manage computer resources and enable users to i
Explanation level
Definition
The main tasks or functions of an operating system are the essential services it provides to manage computer resources and enable users to interact with the system effectively.
Main Idea
An operating system performs several critical functions to ensure that the computer works efficiently and safely. These functions include managing processes, memory, files, devices, networks, and security.
Core Concept
Operating system performs the following main tasks or functions:
Process Management
Memory Management
File Management
Device Management
Network Management
Security Management
Detailed Explanation
Process Management
A process is a program in execution, and process management in an operating system allocates resources like CPU time to various processes in memory.
For example, with three processes (A, B, and C), each having different CPU cycles (A = 5 ms, B = 2 ms, C = 1 ms), the OS manages execution times.
In Case 1 (ABC order), the total time is 6.67 ms.
In Case 2 (BCA order), it's 4.33 ms.
This shows that Case 2 is more efficient.
Memory Management
Memory management is the part of the operating system that controls and manages the operation of main memory during the operation of the computer. It allocates space to programs that are loaded in main memory for execution. It keeps track of freed memory when a program is closed and updates the memory status.
Example: In this example, the OS swaps out a process (Process P₂) from main memory (RAM) to backing store (HD) when it is not needed, and swaps in a process (Process P₁) when it is needed. This allows the computer to run more programs than the available physical memory would normally allow.
File Management
File management is the part of the operating system that manages files and folders on storage devices such as hard disk, USB flash drive, and DVD. It allows the computer user to perform operations such as creating, copying, moving, renaming, deleting, and searching files and folders. It also allows the user to perform read, write, open, and close operations on files and folders.
Fig 1.6 shows the management of files in various folders by OS.
Device Management
Device management is the part of the operating system that controls input and output devices, such as keyboards, mouse, printers, and network interfaces. Efficient IO management improves the performance of the computer.
Example: There are three programs A, B, and C which are using the printer. Now the OS will decide which program uses the printer first. A queue will be set by the OS, and each program will get the printer by its turn.
Network Management
Network management is the part of the network operating system that monitors and manages the resources of a network. It allows the creation of user groups and assigns privileges to them. It shares the network resources among users and detects and fixes network problems.
Security Management
Security management in an operating system ensures resources are used according to user privileges set by the system administrator. It creates user accounts, enforces security policies, controls access to resources, and protects the system from unauthorized access and malware.
Important Points
- The OS manages processes, memory, files, devices, networks, and security.
- Process management allocates CPU time to processes.
- Memory management controls main memory and handles swapping.
- File management handles file and folder operations.
- Device management controls IO devices and manages queues.
- Network management monitors and manages network resources.
- Security management enforces security policies and protects from unauthorized access.