Which of the Following is Abstracted by an Operating System?
Options:
1. Hardware Complexity
2. Memory Management
3. Program Execution
4. CPU Scheduling
5. Input-Output Management
Before learning about the topic i.e. which of the following is abstracted by an operating system, let us first get a brief understanding of the operating systems.
An Operating System is nothing but a software program that acts as an interface between the hardware and users. The main aims of an operating system is to manage the computer resources like memory, file system, security etc. So, we can simply say that the operating system gives a platform to the application software and other system software to perform their task.
Refer to the diagram below to understand the value and working of the operating system.
As we have seen above, an operating system is the brain of the computer system and acts as an interface between the user and the hardware. In this process, the operating system hides the complexity of the working (details of the working) and only shares or shows the necessary things to the application and system programs. So this hiding of the background complexity is known as abstraction.
Now, let us first look at the two of the most important features abstracted by the operating system.
-
Is Hardware Complexity abstracted by an Operating System? Answer - Yes, the hardware abstraction is one of the most important features of an operating system as it allows the system users or developers to develop system-independent applications(refer to the example below for better understanding). An application can use the standard operating system calls (system calls) to interact with the hardware.
Suppose a developer is developing a chatting application then the developer should not be concerned with the problem that he/she will have to develop the same application for the various existing operating systems like windows, Linux, chromOS, etc. He or She can develop an operating system independent application and for interaction with the hardware, he/she can use the various system calls provided by the various operating systems.
-
Is Memory Management abstracted by an Operating System? Answer - Yes, memory and its management is abstracted by the operating system from the end-users. The users need not to worry about how the system is managing the memory allocation and deallocation.
Memory management is managing the data stored present on the memory for achieving proper utilization of the memory. Memory management plays an important role in achieving a degree of multiprogramming (running of two or more programs simultaneously by a computer with more than one central processor).
An operating system uses various memory management techniques such as paging or segmentation to schedule jobs or processes in such a way that user processes and system processes can run smoothly and the user need not be worried about the background complexity.
Note:
-
Segmentation divides the user program and the secondary memory into uneven-sized blocks known as Segments.
-
Paging is a technique that divides memory into fixed-sized blocks. The main memory is divided into blocks known as Frames and the logical memory is divided into blocks known as Pages.
Let us suppose a situation in which the operating system is using the paging technique to manage the memory. Now, if a user process is to be executed then the os must divide the process into smaller pages and load them into the main memory. The user only needs to call the process and the entire execution process is handled by the Operating System itself.
-
Let us now some of the other features abstracted by an operating system:
-
Program Execution: An operating system provides an environment for the execution of programs. Not just that, the operating system is responsible to load the program in execution from the secondary to the main memory (RAM). After loading the program into the main memory, the operating system provides CPU access to the program(CPU is assigned when the program is loaded into the main memory and it is ready for the execution). Once the execution of the program is completed, the Operating System also makes sure that the program is removed from the main memory (memory release).
-
CPU Scheduling: The users can execute various processes at a time, so an operating system must execute the processes in such a way that the CPU utilization is maximized and process response time is minimized. Scheduling of processes is one of the most important aspects or roles of any operating system.
Process Scheduling is an important activity performed by the process manager of the respective operating system. The Process Scheduler of an operating system deals with process scheduling. The process scheduler chooses a process to be executed, and the process scheduler also decides for how long the chosen process is to be executed. Process Schedulers use scheduling algorithms to choose the best process to be scheduled hence helping in better utilization of the CPU.
-
Input-Output Management: The operating system deals with device drivers of various input-output devices such as keyboards, mouse, monitors, etc (these devices can be accessed via system calls). A program may require to access some file(s) in between its execution, so the operating system also provides a means to access the file(s) via system calls. So, an operating system also abstracts the entire process of communication complexity by just providing system call interfaces to the processes for communication with the input-output devices.
Apart from these, the operating system also abstracts the complexity of resource management, file system management, disk management, communication between processes, etc. so that processes can execute smoothly. It helps the users to execute its program without considering the underlying process. As we have learned various features abstracted by the operating system under the topic - What are the basic services provided by the operating system, let us now shift our focus to how the operating system provides abstraction and the actual purpose of abstraction.
What is Abstraction in Operating Systems?
Abstraction simply means hiding the working complexity or technical details of the system. The operating system provides a level of abstraction or a layer of abstraction with the help of OSAL. OSAL stands for Operating System Abstraction Layer, a set of application programming interfaces (APIs) that a developer can use to quickly develop an application without considering the type of operating system, hardware, and background complexity of the operating system.
Suppose a developer wants to develop an application then the developer does not need to bother about various operating systems. They can create a platform-independent application and use the various system calls provided by the different operating systems to interact with the underlying hardware.
The abstraction layer of the operating system provides easy-to-use Wrapper functions to interact with various operating system functionality. As the name suggests, a Wrapper function encapsulates the system functions offered by the operating system. An operating system also provides a hardware abstraction layer so that the user processes or system processes can simply use the hardware devices with the help of specific system calls. So, we need not worry about the various types of input and output devices, as the operating system is hiding the details and only providing us system calls as an interface to communicate with them.
What is the Purpose of Abstraction in an Operating System?
The main purpose of abstraction provided by the operating system is to hide the working complexity or technical details of the system. With the help of abstraction, the Operating System provides a separation between hardware and software.
Refer to the next section for an example of abstraction provided by the operating system.
Example Of Abstraction in Operating Systems
Let us suppose a real-life example where a user process is running and suddenly the process needs to take some input from the user so that the execution can be completed.
Now, if there was no operating system then the process will need to know the actual input device (like the device driver used by the input device, speed of transfer, etc.).and after getting this information, the process will communicate with the device for further execution.
But, we have a magical software i.e. operating system, when the process needs to communicate with the input device, the operating system takes the responsibility for the communication, and the OS will provide certain system calls to the processes using which process can directly take inputs from the input device. In this way, the operating system hides the entire details and complexity by providing a layer of abstraction.
Learn More about Operating System
As we have got a good understanding of the topic: which of the following is abstracted by an operating system. To learn more about the operating systems particularly, refer to the below article:
Conclusion
- Abstraction means hiding the working complexity of the system. The operating system provides a layer of abstraction with the help of OSAL.
- OSAL stands for Operating System Abstraction Layer, a set of APIs that a developer can use to quickly develop an application without considering the type of operating system, hardware, and background complexity of the operating system.
- The main purpose of abstraction provided by the operating system is to hide the working complexity or technical details of the system. With the help of abstraction, the Operating System provides a separation between hardware and software.
- Operating system provides hardware abstraction which allows the system users or developers to develop system-independent applications.
- Using a hardware abstraction layer the user processes or system processes can simply use the hardware devices with the help of specific system calls.
- Operating system provides memory abstraction by using various memory management techniques so that system processes can run smoothly and the user need not worry about the allocation and de-allocation of memory.