
An Operating System (OS) is the backbone of any computing device, managing both hardware and software resources to ensure smooth functionality. It acts as an intermediary between users and the system’s underlying complexities, allowing programs to run efficiently while handling resource allocation, security, and process execution. In this blog, we’ll dive deep into its core functions, modes, and the essential concepts of abstraction and arbitration that make multitasking and resource management seamless.
Table of contents
- What is an Operating System?
- Functions of Operating Systems
- What is Abstraction?
- What is Arbitration?
- Paging
- Segmentation
- Modes of Operating System
- Kernel mode
- User mode
- Mode switching
- Conclusion
- Frequently Asked Question
- What is an Operating System (OS)?
- What is an abstraction in an Operating System?
- What is arbitration in an Operating System?
What is an Operating System?
An Operating System manages all the computer’s resources, including hardware and software. It provides an environment in which a user can execute his/her programs conveniently and efficiently by hiding the hardware’s underlying complexities and acting as a Resource Manager.
Functions of Operating Systems
- It has access to the computer hardware.
- OS acts as an interface between the user programs and the resources.
- It facilitates the execution of the programs by providing protection and isolation.
- It hides the underlying complexities of the system hardware also known as Abstraction.
- OS does Resource Management (Memory/RAM, CPU/GPU, Disk, etc) also known as Arbitration.
Also Read: Understanding Program, Process, and Thread in Operating Systems
What is Abstraction?
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.
What is Arbitration?
Arbitration in an Operating System is a set of rules that allocate machine resources, such as memory or peripheral devices, to multiple users or programs. It acts as a controller to divide hardware resources into the running processes or apps. Arbitration helps to create a more efficient and adequate multitasking environment in the OS. It also enforces system and security policies to isolate apps from interfering with each other. For example, arbitration can prevent a software crash from affecting other running software.
An operating system uses various memory management techniques such as Paging or Segmentation.
Paging
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.
Segmentation
Segmentation divides the user program and the secondary memory into uneven-sized blocks known as Segments.
Explore: The Process of Application Execution in Computer Systems Explained
Modes of Operating System
Operating systems have different operating modes to fulfil the need to run the application or compute a process as per user inputs. These modes define the level of access and privileges granted to execute tasks.
Kernel mode
A kernel is referred to as the heart of an operating system. It interacts with the hardware to compute the processes. A kernel is also the first component to load in an OS upon starting a machine.
Key points to remember: –
- Kernel mode is the most privileged mode in an operating system.
- In this mode, the operating system kernel has unrestricted access to all resources, including memory and I/O devices.
- The kernel can execute any CPU instruction.
- Kernel mode is responsible for critical system tasks such as memory management, process scheduling, and handling interrupts.
- If a process running in kernel mode encounters an error, it can crash the entire system.
User mode
All the application software runs in this mode, these applications don’t have privileged access to the underlying hardware, to execute them, to do so they have to interact with the Kernel.
E.g: Graphical User Interfaces and Command Line Interfaces.
Also Explore: 12 Exciting Software Development Project Ideas [With Source Code]
Key points to remember:
- User mode is a less privileged mode compared to kernel mode.
- Processes running in user mode have limited access to system resources and are restricted from performing sensitive operations directly.
- User-mode applications cannot access memory locations or execute instructions that could potentially harm the system.
- To access system resources or perform privileged operations, user mode processes must make system calls to the operating system kernel.
- If a process running in user mode encounters an error, it is isolated from other processes and cannot affect the entire system.
Mode switching
- The CPU has a mode bit that indicates whether it is currently running in user mode (mode bit = 1) or kernel mode (mode bit = 0).
- When a user mode process needs to perform an operation that requires kernel mode access, it makes a system call.
- The operating system kernel handles the system call, switches the CPU to kernel mode, performs the requested operation, and then switches back to user mode before returning control to the calling process.
- This mode-switching process involves saving the current context of the CPU, changing the mode bit, and loading the appropriate context for the new mode.
Looking to master the core concepts while building a strong foundation in web development? GUVI’s Full-Stack Development Course is designed to equip you with in-demand skills like front-end and back-end development, database management, and system architecture. Learn from industry experts, work on real-world projects, and gain hands-on experience with the latest tools and technologies. This course will help you become a job-ready full-stack developer. Take the first step toward your tech career!
Conclusion
Operating Systems are essential for optimizing computing resources, ensuring security, and enhancing user experience. By abstracting hardware complexities and implementing arbitration techniques, an OS ensures smooth multitasking, efficient memory management, and secure process execution. Understanding its working principles, from kernel vs. user mode to memory management techniques, helps developers and IT professionals build better systems and applications. As technology advances, operating systems continue to evolve, adapting to new computing needs and innovations.
Frequently Asked Question
An Operating System (OS) is software that manages computer hardware and software resources while providing essential services for application programs. It acts as an intermediary between users and the computer hardware.
Abstraction in an OS hides the underlying hardware complexities from the user and applications. It provides a simplified interface for developers through APIs, making software development more efficient without needing to manage low-level hardware details.
Arbitration is the OS’s method of allocating system resources like CPU time, memory, and disk space among multiple processes. It ensures efficient multitasking and prevents one process from monopolizing system resources, maintaining system stability and performance.
Did you enjoy this article?