A modern computer consists of one or more processors, some main memory, disks, printers, a keyboard, a mouse, a display, network interfaces, and various other input/output devices. All in all, a complex system.
If every application programmer had to understand how all these things work in detail, no code would ever get written.
Computers are equipped with a layer of software called the operating system, whose job is to provide user programs with a better, simpler, cleaner, model of the computer and to handle managing all the resources just mentioned.
Operating system
A program that controls the execution of application programs and acts as an interface between applications and the computer hardware and controls the execution of all kinds of programs
Objectives of an operating system
Convenience
Efficiency
Ability to evolve
Operating system as an extended machine
Hides the messy details which must be performed
Presents user with a virtual machine, easier to use
Operating system as a resource manager
Each program gets time with the resource
Each program gets space on the resource
What an operating system does
1. Acts as an intermediary between the user of a computer and the computer hardware
2. Provides an environment in which a user can execute programs in a convenient and efficient manner
Components of a computer system
Hardware
Operating system
Application programs
User
Hardware
Central processing unit (CPU)
Memory
Input/output (I/O) devices
Application programs
Word processors
Spreadsheets
Compilers
Web browsers
Role of operating system
Controls the hardware and coordinates its use among the various application programs for the various users
Many users interact with mobile devices such as smartphones and tablets—devices that are replacing desktop and laptop computer systems for some users.
The user interface for mobile computers generally features a touch screen, where the user interacts with the system by pressing and swiping fingers across the screen rather than using a physical keyboard and mouse.
Many mobile devices also allow users to interact through a voice recognition interface, such as Apple's Siri.
Some computers have little or no user view, such as embedded computers in home devices and automobiles.
Main components of a computer system
Hardware
Operating system
User interface program (shell or GUI)
Applicationprograms
Kernel mode
The operating system runs in this mode and has complete access to all the hardware and can execute any instruction the machine is capable of executing
User mode
The rest of the software runs in this mode, in which only a subset of the machine instructions is available
Importantfunctionsofan operating system
Memorymanagement
Processormanagement
Devicemanagement
Filemanagement
Security
Control over systemperformance
Jobaccounting
Errordetectingaids
Coordinationbetweenothersoftware and users
Memory management
Keeps tracks of primary memory, decides which process will get memory when and how much, allocates and de-allocates memory
Processor management
Keeps tracks of processor and status of process, allocates and de-allocates processor
Device management
Keeps tracks of all devices, decides which process gets the device when and for how much time, allocates and de-allocates devices
File management
Keeps track of information, location, uses, status etc. of files and directories, decides who gets the resources, allocates and de-allocates the resources
Otherimportantactivities of an operating system
Security
Controloversystemperformance
Jobaccounting
Errordetectingaids
Coordinationbetweenothersoftwareandusers
Without an operating system, every program will need a means to handle all computer components and hardware.
First Generation - Vacuum Tubes and Plug boards
1945 – 1955
Digital computers were not constructed until the second world war.
When electronic computers were first introduced in the1940's, they were created without any operating systems.
Programming languages were unknown (even assembly language) and there were no operating systems, so all the programming was done in absolute machine language, or even worse yet, by wiring up electrical circuits by connecting thousands of cables to plugboards to control the machine's basic functions.
By the early 1950's punch cards were introduced, and this improved the computer system.
Second Generation - Transistors and Batch System
1955 – 1965
Transistors led to the development of the computer systems that could be manufactured and sold to paying customers with the expectation that they would continue to function long enough to get some useful work done.
These new machines were called mainframes, and they were used by professional operators in large computer rooms.
Running a job in the batch system
1. Programmer writes program on paper, punches it on cards, brings card deck to input room and hands it to operator
2. Operator reads card deck onto magnetic tape
3. Operator loads special program (ancestor of today's operating system) which reads first job from tape and runs it
4. Output is written onto a second tape
5. Operator removes input and output tapes, replaces input tape with next batch, brings output tape to 1401 for printing off line
The first operating system was introduced in the early 1950's, it was called GMOS and was created by General Motors for IBM's machine the 701.
Operating systems in the 1950's were called single-stream batch processing systems because the data was submitted in groups or batches.
Batch processing system
1. Programmers bring cards to 1401
2. 1401 reads batch of jobs onto tape
3. Operator carries input tape to 7094
4. 7094 does computing
5. Operator carries output tape to 1401
6. 1401 prints output
GMOS
First operating system, created by General Motors for IBM 701