An operating system performs the following functions:
- Memory management
- Task or process management
- Storage management
- Device or input/output management
- Kernel or scheduling
The method of handling machine memory is memory management. Two types of machine memory are:
After freeing the memory, the memory section for applications and programmes is reserved.
Read also: Data base
Operating System Memory Management
Memory management is important for the operating system involved in multitasking wherein the OS requires switching of memory space from one process to another. Every single program requires some memory space for its execution, which is provided by the memory management unit.
A CPU consists of two types of memory modules:
virtual memory and physical memory. The virtual memory is RAM memory, and the physical memory is a hard disk memory. An operating system manages the virtual memory address spaces, and the assignment of real memory is followed by the virtual memory address.
Before executing instructions, the CPU sends the virtual address to the memory management unit. Subsequently, the MMU sends the physical address to the real memory, and then the real memory allocates space for the programs or data.
Task or Process Management
Process management is an instance of a program that is being executed. The process consists of a number of elements, such as an identifier, program counter, memory pointer and context data, and so on. The Process is actually an execution of those instructions.
There are two types of process methods: single process and multitasking method. The single process method deals with a single application running at a time. The multitasking method allows multiple processes at a time.
Storage management is a function of the operating system that handles memory allocation of the data. The system consists of different types of memory devices, such as primary storage memory (RAM), secondary storage memory, (Hard disk), and cache storage memory.
Instructions and data are placed in the primary storage or cache memory, which is referenced by the running program. However, the data is lost when the power supply cut off. The secondary memory is a permanent storage device. The operating system allocates a storage place when new files are created and the request for memory access is scheduled.
Device or Input/output Management
In computer architecture, the combination of CPU and main memory is the brain of the computer, and it is managed by the input and output resources. Humans interact with the machines by providing information through I/O devices.
The display, keyboard, printer, and mouse are I/O devices. The management of all these devices affects the throughput of a system; therefore, the input and output management of the system is a primary responsibility of the operating system.
Read also: Data protections Act
Scheduling by an operating system is a process of controlling and prioritizing the messages sent to a processor. The operating system maintains a constant amount of work for the processor and thus balances the workload.
As a result, each process is completed within a stipulated time frame.
Hence, scheduling is very important in real-time systems. The schedulers are mainly of three types:
Long term scheduler
Short term scheduler