Definition: An operating system is a program that acts as an interface between the user and the computer hardware and controls the execution of different programs. Some important features of an OS are Memory Management, Process Management, and File Management.
Examples: There are several widely-used operating systems that cater to various types of computing environments, including but not limited to:
Linux: An open-source OS known for its stability and security; widely used in servers and embedded systems.
Windows: A prominent OS created by Microsoft, known for its user-friendly GUI, widely used in personal and business desktop environments.
iOS: Developed by Apple, this OS is specifically designed for iPhone and iPad devices, featuring a closed ecosystem and a focus on security and user experience.
Android: A Linux-based OS developed by Google, widely used in mobile devices and known for its customizable interface.
VMS: Developed by Digital Equipment Corporation, primarily used in high-end computing environments and known for its reliability.
OS/400: Designed for IBM's iSeries servers, it is optimized for robust performance in business environments.
AIX: A Unix-based OS from IBM, primarily used in enterprise-level servers and known for its scalability and performance.
z/OS: A mainframe OS developed by IBM, designed for enterprise applications requiring high levels of security and reliability.
Key Functions of an OS:
Memory Management: Memory management refers to the management of primary memory or main memory. Main memory provides a fast storage that can be accessed directly by the CPU. It keeps track of main memory, allocates the memory when a process requests it, and de-allocates the memory when a process no longer needs it.
Process Management: In multiprogramming environments, the OS decides which process gets the processor when and for how long. This function is called process scheduling, and it is crucial for optimizing CPU usage and ensuring efficient execution of processes.
Device Management: This function manages communication between the OS and hardware devices. It ensures the proper functioning of device drivers, coordinating data transfers and resource allocation among different hardware components.
Device Management Activities: Device Management keeps track of all devices (the program responsible for this is called the I/O Controller), decides which process gets the device when and for how much time, and allocates the device in the efficient way.
File Management: Organizes and maintains the storage and retrieval of files and directories, offering access control and ensuring data integrity. It implements the file system and resource allocation to optimize storage usage.
File Management Activities: Keeps track of information, location, uses, status etc. The collective facilities are often known as file system. Decides who gets the resources. Allocates the file resources
Security − By means of password and similar other techniques, it prevents unauthorized access to programs and data.
Control over system performance − Recording delays between request for a service and response from the system.
Error detecting aids − Production of dumps, traces, error messages, and other debugging and error detecting aids
Virtual Memory: Virtual memory is a memory management capability of an operating system (OS) that uses hardware and software to allow a computer to compensate for physical memory shortages by temporarily transferring data from random access memory (RAM) to disk storage
Cache Memory: A high speed memory which is used to reduce the access time for data by storing the copies of original data that has been recently used.
Device Drivers: A device driver provides a software interface to hardware devices, enabling operating systems and other computer programs to access hardware functions without needing to know precise details of the hardware being used.
Bootstrap Process:
Bootstrapping: The initial loading process of the OS upon computer startup includes running diagnostic tests and loading the kernel into memory. This essential sequence prepares the system for user interaction and application execution, establishing the environment needed for operations.
Programs That Load The OS: GNU Grand Unified Bootloader (GRUB), NT Loader (NTLDR), Linux Loader (LILO), Network Interface Controller (NIC) and Windows Boot Manager.
User Interfaces:
CLI (Command Line Interface): A method for users to interact with the computer system by typing commands directly. This interface offers advanced users powerful capabilities to control the OS efficiently, although it requires familiarity with command syntax.
GUI (Graphical User Interface): Designed for user-friendliness, this interface utilizes windows, icons, and menus, enabling interaction through visual elements. The GUI is accessible for a broader audience, simplifying operations often performed in complex command lines.
Touchscreen Interfaces: Increasingly common in mobile and portable devices, these interfaces respond to gestures and utilize virtual keyboards, allowing intuitive user interaction and enhancing accessibility.
Challenges in OS Design:
Synchronization Issues: Ensuring that multiple programs waiting for I/O are correctly signaled is vital to maintaining system efficiency and preventing resource contention.
Deadlock: These scenarios occur when multiple processes are waiting indefinitely for resources held by each other, leading to system freeze states. Effective deadlock prevention and recovery strategies are essential in OS design to maintain reliability and performance.
Process Management:
Process States: At any given time, processes can be in various states including running, ready, and blocked, depending on their execution status and availability of resources.
Transitions: Changes in process states frequently occur due to events such as the availability of input/output, signals from the OS, interrupts, or time-slice expirations.
Interrupt Processing: This essential function involves responding to hardware interrupts from I/O devices, signaling the CPU to suspend its current task and address the request, thus ensuring timely handling of external events.