What is an operating system? What are the basic functions of an OS? Know about this and more in this Techspirited article on the fundamentals of operating systems.
An operating system is a software component of a computer, and is responsible for the management of a variety of computer operations as also the sharing of computer resources. It hosts computer applications and handles the operations of computer hardware. Users and application programs access the operating system services through system calls and application programming interfaces. In short, an operating system acts as an interface between the application programs and the computer hardware. Desktop computers, PDAs, laptop computers, notebook computers and even most mobile phones of today, come with an operating system.
Before exploring the operating system fundamentals, you may find it interesting to read about the different types of operating systems.
Access Control
When a computer is started, it runs in the supervisor mode, which means that the first few programs running on the computer and the operating system have unlimited access to the hardware. An operating system has the ability to place a computer in the protected mode, wherein programs are given a limited access to computer resources.
Execution of Programs
Programs in execution are known as processes. The execution of a program requires the operating system to create processes. The operating system kernel creates a process by loading program code from the disk and allocating memory to it before running the program.
User Interface
Users interact with operating systems by means of command line interfaces or graphical user interfaces. Though a graphical user interface cannot be referred to as an operating system service, many operating systems integrate support for user interfaces into their kernels. Beginning from Windows 95, Microsoft Windows has kept revising its user interfaces. Their latest operating system Windows Vista implements a graphics subsystem.
Memory Management
The operating system kernel handles the allocation and management of memory that programs use. In a cooperative memory management strategy, it is assumed that programs make voluntary use of the computer memory. This strategy was used by operating systems of the olden times. Modern operating systems implement segmentation and paging mechanisms facilitating memory protection, whereby all computer programs can obtain a fair share of memory for their execution. The operating system kernel controls the amount of memory allocated to application programs. An operating system can use the same memory locations for multiple tasks, using the underlying concept of virtual memory and swapping or paging.
Scheduling
An operating system kernel consists of a scheduler program that manages the time taken by each program for its execution. Kernel passes the controls to processes whereby they can access the CPU and memory. In cooperative multitasking, each process is allowed to use the system resources for an unlimited period. Pre-emptive multitasking mechanisms have replaced cooperative multitasking. Windows NT was the first to implement pre-emptive multitasking. This feature reached the users after Windows XP was released.
Interrupt Handling
An operating system has to deal with unexpected events in program execution. They are known as interrupts. Interrupts may also come from computer hardware. If a piece of computer hardware triggers an interrupt, the operating system kernel devises ways to handle it. Interrupts triggered by running programs can also be handled by the operating system kernel.
Management of Files
Operating systems are in charge of handling the application program access to files stored on the disk. The operating systems of the earlier days did not support different types of file systems. But the relatively recent operating systems, like Unix and Linux, implement a virtual file system allowing various types of programs to access a variety of system resources and devices that use different file systems.
File systems are methods used for storing and managing computer files and data. A file system can be considered as a specialized storage system for the organization, access and retrieval of data.
Computer Security
It is a function of the operating system to handle multiple user profiles. When you log in to your user account on the operating system you use, you are actually being a part of the security measures implemented by your operating system. Most operating systems require their users to log in to their accounts by means of a username and password. Recent developments in technology have introduced advanced user recognition methods like biometry. Windows Vista has introduced User account control, whereby each logon session is associated with a token containing the privilege assigned to that session.
Computer Networking
Operating systems support a variety of networking protocols, whereby computers running different operating systems can work over a common network. The operating system support for networking protocols enables the computers to access resources on remote computers in fairly simple ways.
We can say that operating systems play an important role in facilitating user access to computer systems. They schedule computer tasks, control access to resources, manage computer memory, and handle files. And they do all this while also ensuring computer security.