An operating system is a program that controls the execution of application programs and act as an interface between the user of a computer and the computer hardware.
Functions of an Operating System
The operating system performs the following functions:
- Provides the instructions to display the on-screen elements with which you interact.
- Load programs into the computer memory so that you can use them.
- Coordinate how programs work with the CPU, RAM, keyboard, mouse, printer, and other hardware as well as with other software.
- Manages the way information is stored on and retrieved from disk.
Operating System's Role in Running of a Program
The operating system provides a consistent interface between programs and the user. It is also the interface between those programs and other computer resources such as memory, a printer, or another program. Programmers write computer programs with built-in instructions–called system calls–that request services from the operating system.
For example, when you want your word processing program to retrieve a file, you use Open dialog box to list the files in the folder that you specify. To provide the list, the program calls on the operating system.
Some other services that an operating system provides to programs, in addition to listing files, include:
- Saving the content of file to a disk.
- Reading the contents of a file from disk into memory.
- Sending a document to the printer, and activating the printer.
- Providing resources that let you copy or move data from one document to another, or from one program to another.
- Allocating RAM among the programs that are running.
- Recognizing keystrokes or mouse clicks, and displaying characters or graphics on the screen.
Multitasking
It means much more than the capability to load multiple programs into memory; it means being able to perform two or more procedures–such as printing a multiple-paged document, sending e-mail over the Internet, and accepting data input when the user types a letter – simultaneously.
Software engineers use two methods to develop multitasking operating systems.
- Co-operative multitasking: It requires cooperation between the operating system and application programs. Programs that are currently running will periodically check the operating system to see whether ant other program need the CPU.
Preemptive multitasking: With this method, the operating system maintains a list of programs that are running and assigns a priority to each program in the list. The operating system can preempt the program that is running and reassign the time to a higher priority task at any time.
No comments:
Post a Comment