Fundamentals of operating systems modal questions answer
Answers
Answer:
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.
Functions of Operating System
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.
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.