An operating system basically performs three independent tasks: it allows load after each other programs, it emulates a virtual machine and manages resources. Specify each task.
We’ll be covering the following topics in this tutorial:
The first computers were supplied without an operating system. The very first PCs had only one agenda: a BASIC language interpreter who was contained in ROM. Upon occurrence of cassette players and so more reliable, floppy drives, this began to change: if an executable disk was placed in the floppy drive, the program was executed (it was eventually then replaces the disk with a data disk), otherwise the BASIC interpreter repeated the hand.
With this approach, each program change required restarting the microcomputer with the disk of the desired program in the floppy drive. This was the case especially the Apple II.
Microcomputers were then, optionally, provided with an operating system. Thereof, Content on disk or in RAM memory, showed a prompt on the screen. You could then replace the system boot disk with a disk containing the program desired: by writing the name of the program on the command line and pressing Back, the program was loaded and executed. At the end of the execution of this program, could load a new program without having to restart the system. This allows, for example, writing a text with a word processor and then call another program for printing.
The operating system as a virtual machine
The management of a given computer system, such as the IBM-PC, is a prior language machine. This is primary and cumbersome for most computers, especially regarding the input-output. Few programs would be developed if each programmer had knowledge of the operation, for example, of a particular hard drive any errors that may occur when playing a block. It was therefore necessary to find a way to free programmers from the complexity of the material. This involves coating the material with a layer of software that manages the entire system. Must be presented to the programmer an API (Application Programming for English interface, programming interface application), which corresponds to a virtual machine easier to understand and program.
Consider for example the programming of hard drives IO using the IDE controller used on the IBM PC.
The IDE controller has 8 main commands all are to charge between 1 and 5 bytes in its records. These commands read and write data, move the arm of the disc, format the drive as well initialize, test, restore and re-calibrate the controller and disks.
The basic commands are reading and writing, each requiring seven parameters grouped in six bytes. These parameters specify the elements such as address
the first sector to read or write, the number of sectors to read or write, or whether to try to correct the mistakes. At the end of the operation, the controller returns 14 status fields and error grouped into 7 bytes.
Most programmers do not want to worry about the programming of hard drives. They want a simple high-level abstraction: consider for example that the disc contains files named; each file can be opened in read or write; it will be read or written, and finally closed. Part virtual machine operating systems subtracts the material under the programmer and provides a simple and pleasant view files appointed that can be read and written.
The operating system as a resource manager
Modern computers consist of processors, memory, clocks, records, monitors, network interfaces, printers, and other devices that can be used by multiple users simultaneously. The work consists of the operating system to direct and control the allocation of processors, memory and peripheral devices the various programs that use it.
Imagine what would happen if three programs running on a computer trying simultaneously to print the results on the same printer. The first printed lines could come from program 1, the following program 2, and then the program 3 and so on. This would result in the total disorder. The operating system can avoid this potential chaos by transferring the results to be printed in a buffer file disk. When printing is completed, the operating system can then print the files in the buffer. Simultaneously, another program can continue generate results without realizing that it does not send them (yet) to the printer.