What is an operating system? What are its functions?

The operating system is a program that acts as an interface between the user and the hardware. It is a collection of programs that coordinates the operations of computer hardware and software.

Functions of an operating system:
1. Starting the Computer: In most computers, the BIOS and the diagnostic routines are contained in ROM. They are permanently available to other programs to check equipment and perform input/output tasks. In addition, ROM contains a bootstrap loader program that is used to start a computer.
The remainder of the operating system is contained in secondary memory.
When the computer is turned on, it automatically begins to execute the boot program. This program first runs diagnostic programs to check the status of RAM and of each of the attached system devices.
The boot program then reads in the operating system executive program from the disk. The layout of the memory at this stage is shown in figure.
Ram
2. Running application programs: To run an application programs such as word processing program, the user types the name of the program after getting the Dos prompt on the screen.
Ex C:\>WS
The operating system accepts the command WS and reads the program into RAM. When the application program is in RAM, the operating system executive program gives control of the computer system to the applications programs. The computer then executes the application program. When the application program ends, control is restored to the operating system executive program, which monitors the keyboard for the users’ next command.

When the application program is running the operating system manages the allocation of memory. When a user requests that a program be run, the operating system allocates the memory required for the program instructions and for data.

3. Running utility programs: An operating system includes utility programs that give the user control over various features of the computer system. The utility programs are either residient or transient. Residient programs are always present in RAM; transient program must be read into RAM, as they are requested.
Ex. CON: name of the keyboard, or console.
PRN: name of the printer.
Disk Copy A: B: (copies the contents of the disk in drive A, onto the disk on drive B)

4. Managing files: Information on the disk is organized into files. A file is collection of Bytes.