An operating system (OS) is essential software that manages a computer's memory, processes, hardware, and software, enabling user interaction. It loads into RAM when the computer is turned on and is necessary to run any programs. OS has evolved since the first computer generation and is present in all devices like desktops, tablets, and smartphones, with common examples being Windows, Mac OS, Linux, iOS, and Android.
1.4.1 Main Tasks/Functions of an Operating System
Operating system performs the following main tasks or functions.
Process Management Memory Management File Management Device Management Network Management Security management
Diagram image pending upload by Admin.
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, while in Case 2 (BCA order), it's 4.33 ms, showing that Case 2 is more efficient.
Memory Management
Memory ManagementMemory management is the part of operating system that controls and manages the operation of main memory during the operation of 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.
Diagram image pending upload by Admin.
Example: In this example the OS is
File Management
File management is the part of operating system that manages files and folders on storage devices such as hard disk, USB flash drive and DVD. It allows 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.
Diagram image pending upload by Admin.
Device Management
Device management is the part of operating system that controls input and output devices, such as keyboards, mouse, printers, and network interfaces. Efficient I/O management improves the performance of the computer. As shown in Fig. 1.7.
Diagram image pending upload by Admin.
Example: There are three programs A, B and C which are using the printer. Now the OS will decide which program to use the printer first. A queue will be set by the OS and each program will get the printer by its turn.
1.4.2 Types of Operating Systems
Batch Processing Operating System
A batch processing operating system groups similar tasks into batches and executes them sequentially. It is ideal for repetitive tasks, such as payroll processing or generating bank statements, where the same operation is applied to multiple users or jobs. While this system provides efficiency in handling large volumes of similar tasks, it may introduce delays as jobs are processed one after another.
Diagram image pending upload by Admin.
Multiprogramming Operating System (RTOS)
A multiprogramming operating system allows multiple programs to be loaded into the main memory simultaneously. Although the CPU can execute only one program at a time, it switches between programs when one is waiting for input or output, thus maximizing CPU utilization. This system is designed to improve the efficiency of the computer by ensuring that the CPU is rarely idle.
Diagram image pending upload by Admin.
Multitasking Operating System
A multitasking operating system enables multiple tasks to be performed concurrently on a single CPU. The system rapidly switches between tasks, creating the impression that all tasks are running simultaneously. This capability is essential for modern personal computers and mobile devices, where users often run several programs at once.
Diagram image pending upload by Admin.
Time-sharing Operating System
Atime- sharing operating system divides CPU time into short intervals, known as time slices, and allocates each program a time slice in turn. This method allows multiple users or programs to interact with the system simultaneously, giving the appearance that all are being processed at the same time. Time- sharing systems are commonly used in environments such as banks, universities, and large organizations that require multiple users to access the system concurrently.
Real-time Operating System (RTOS)
A real- time operating system is designed to process data and provide immediate responses. It is used in environments where timing is critical, such as medical equipment, traffic control systems, and industrial automation. Real- time systems must operate within strict time constraints to ensure that tasks are completed within a specified deadline, making them highly reliable and responsive.
Diagram image pending upload by Admin.
Diagram image pending upload by Admin.
Multiprocessor Operating System
A multiprocessor operating system controls the operation of multiple CPUs within a single computer system. By distributing tasks among several processors, the system can handle large amounts of data more efficiently and increase the overall processing speed. Multiprocessor systems are used in environments requiring high performance, such as data centers, servers, and scientific research applications.
Diagram image pending upload by Admin.
1.4.3. How OS manages to run Applications?
Application programs run on top of operating systems by utilizing the resources and services provided by the operating system. The operating system serves as an intermediary between the hardware and the application programs, managing tasks such as memory allocation, process scheduling, and device management.
For example, when a user opens a word processing program such as Microsoft Word, the operating system allocates memory for the program to run, manages input/output operations such as reading and writing files, and schedules the program to run on the CPU. The operating system also provides access to system resources such as printers and network connections that the application program may need to use.
Overall, the operating system acts as a platform on which application programs can run, providing a layer of abstraction that allows programs to interact with the hardware without needing to know the specific details of the underlying hardware. As shown in Fig 1.18.