Operating Systems
G53OPS
Introduction
An Operating System is a system software, which may be viewed as an organized collection of software consisting of procedures for operating a computer and providing an environment for execution of programs.
Why Study Operating Systems?
Understand the model of operation
Easier to see how to use the system Enables you to write efficient code
Learn to design an OS Application programs have the real value to person who buys the computer
OS Design Constraints
Performance Protection and security Correctness Maintainability Commercial factors Standards and open systems
Operating System
An Operating System (OS) is a program that controls the execution of application programs and acts as an interface between the user of a computer and the computer hardware. In a simplest way, we can say OS as the software that controls the hardware.
5
User
The operating system sits between the application program and the hardware.
Application program Interfaces Operating system
Hardware
Operating System (OPS)
It is an extended machine
Hides the messy details which must be performed Presents user with a virtual machine, easier to use
It is a resource manager
Each program gets time with the resource Each program gets space on the resource
7
The OS as a Conductor
The OS coordinates the sharing and use of all the components in the computer
Lecture 1 Objectives
To discuss the origins of the Operating Systems and their subsequent developments. To discuss about the generations of computer hardware. To know how the Operating Systems is linked with the history and development of various generations of computer systems.
9
Hierarchical Structure of a Computer
Hierarchical structure of a computer system consists of Hardware system programs application programs
10
Layers and Views of a Computer System
User layer
Application program layer
Operating system layer
Hardware layer
11
Perspectives of the Computer
print cut save send
malloc() open() fork() read-disk start-printer track-mouse
Application Software System Software Hardware
Application Software
System Software
Hardware
Application Software System Software Hardware
(a) End User View
(b) Application Programmer View
(c) OS Programmer View
Layers and Views of a Computer System Electronic Signal
Machine Code
Assembly Language
High Level Language Operating System
User
Application Software
13
A modern operating system contains these primary components.
Application program layer
Operating system layer
User interface (shell) Processor (or process) management File management Device management
Memory management
Communication services
Hardware layer
OS Main functions
The OS also controls and manages the execution of programs that provides services such as Resource allocation, Scheduling, Input/Output control and Data management.
15
Operating System Services
Program creation - Editors and debuggers Program execution Access to I/O devices Controlled access to files System access Error detection and response internal and external hardware errors (memory error, device failure) software errors (arithmetic overflow, access forbidden memory locations) operating system cannot grant request of application Accounting (collect statistics, monitor performance, used to anticipate future enhancements, used for billing users)
16
Kernel
Portion of operating system that is in main memory. Contains most-frequently used functions like I/O management, task scheduling, error handling, and program execution functions. This is the innermost layer of the OS close to the hardware, and controlling the actual hardware. It is the heart of the Operating System. So it is also called as a nucleus.
17
History of the Operating Systems
Zeroth Generation 1791 1871 - Mechanical parts First generation 1945 - 1955 vacuum tubes, plug boards Second generation 1955 - 1965 transistors, batch systems Third generation 1965 1980 ICs and multiprogramming Fourth generation 1980 present personal computers
18
History of Computers
Abacus
The Abacus is generally considered to be the first mechanical computer. First used by the Babylonians (500 B.C.). No significant records left over (gone with the dust and evolution). The form most familiar with us was first used in China in around 1300 A.D.
19
The computer as a concept
1642 Blaise Pascal a French Philosopher invented the Pascaline - first known calculating machine since the Chinese abacus and the slide rule 1671 Gottfried Leibnitz, a German philosopher improved on this by making his machine add, subtract, multiply and divide
20
Zeroth Generation
1791-1871 Charles Babbage, an English mathematician, designed the first machine (analytical engine) that incorporated memory. It had a mechanical design where wheels, gears, cogs, etc were used. As this computer was slow and unreliable, this design could not really become very popular. There was no question of any Operating System of any kind for this machine. Lady Ada Lovelace wrote the instruction for the machineunfortunately it was never built
21
First Generation Computers (1945-1955)
Computer were built with vacuum tubes electronic valves which control the flow of electricity. Electronic tubes were made of glass tubes with circuit inside - the size of light bulbs. Each computer contained a large number of [Link] was written in punch card. The memory was made of magnetic ring. The language used for programming was machine code consists of 0s and 1s (machine language). No Operating System for these machines.
22
Disadvantages of First Generation Computers
Overheating and burnt out after a while Need to replace the components frequently. Cumbersome, difficult to use and maintain Extremely expensive
23
A (Very) Brief History of Computers (II)
Vacuum Tubes
ENIAC
24
1946 ENIAC - Electronic Numerical Integrator And Computer
Build by the US One of the 1st totally electronic valve driven, digital computers Could do 100 000 calculations a second. Requires 150 kilowatt of power, enough to light a small town Each digit represented by a ring of 10 vacuum tubes. Decimal (not binary), 5,000 additions per second Programmed manually by switches 18,000 vacuum tubes, 30 tons, U-shaped 25m long, 2.5m high and 1m wide, 15,000 square feet 70000 resistors, 10000 capacitors, 6000 switches
25
Second Generation Computers (1955 1965)
Computers built with transistors Much smaller and more powerful computers Could handle interpreters such as FORTRAN or COBOL English like commands ( high-level languages) and so much more flexible in their applications. Still relied on punched cards for input and printouts for output. 1958-Philco introduces TRANSAC S-2000, First transistorized commercial machine
26
Second Generation Computers
TX-0 (Transistorised eXperimental computer 0), first transistor based computer, build at MIT Lincoln Labs DEC PDP-1, first affordable microcomputer, performance half that of IBM 7090 (the fastest computer in the world at that time, which cost millions) PDP-8, cheap, the first to use single bus structure.
CDC 6600
An order of magnitude faster than the mighty IBM 7094. First highly parallelized machine (up to 10 instructions in parallel). Separate computational and control units. Burroughs B5000 First to emphasise software and high level programming languages (Algol 60)
27
Disadvantages:
Size of computer still large and expensive Communication was slow I/O device was slow because the computer waiting for cards to be read or reports to be printed
28
Third Generation Computers (1965 1980)
Computer manufacturers begin replacing transistors with integrated circuit (IC)
Instead of punched cards and printouts, users interact with computers through keyboards, monitors and OS, which allowed the device to run many different applications at one time with a central program that monitored in the memory Computers became accessible to a mass audience because they were smaller and cheaper than their predecessors. Example: IBM 360 series mainframe DEC PDP 8 Mini Computer (1965)
29
Fourth Generation Computers (1980 Present)
Microprocessor possible to produce a complete processor on one silicon chip. Microcomputers were introduced can linked together to form networks which eventually led to the development of the Internet Also saw the development of GUIs, mouse and handheld devices.
Example :
The 1st Supercomputer was announced - Cray-1
30
Von Neumann Machines
In 1945, John Von Neumann designed the EDVAC (Electronic Discrete Variable Automatic Computer) which had a memory. This memory was used to store programs and data. It also consists of CPU and an I/O system. The CPU coordinates all the function in the computer. Virtually all-computers are based on concepts developed by John Von Neumann machine.
31
Structure of von Neumann machine
32
Characteristics:
Stored Program concept Main memory stores Instructions and data ALU operating on binary data. ( Arithmetic and Logic operations on data ). The Control unit fetches and interprets the instructions in memory and causes them to execute. Input and output equipment operated by control unit
33
History of Operating Systems
Early batch system
bring cards to 1401 read cards to tape put tape on 7094 which does computing put tape on 1401 which prints output
34
History of Operating Systems
Late 1940s to mid 1950s First Generation - No Operating System Programs interact directly with hardware Two main problems:
Scheduling Setup time
35
Second Generation
Rudimentary Operating Systems developed by IBM : FMS ( Fortran Monitoring System ) and IBSYS
Structure of a typical FMS job
36
Third Generation
Few Operating Systems were developed by IBM :
o CP-67/CMS for the powerful 360/70, using virtual storage
o OS/MVT for the bigger 360 systems
o OS/MFT for the Medium 360 systems o DOS/360 for the small 360 systems
37
Simple Batch Systems
Resident Monitor program Users submit jobs to operator Operator batches jobs Monitor controls sequence of events to process batch When one job is finished, control returns to Monitor which reads next job Monitor handles scheduling
Memory Layout for Resident Monitor
38
Multiprogramming system
three jobs in memory 3rd generation
39
Multiprogramming
Technique for sharing the CPU among runnable processes Process may be blocked on I/O Process may be blocked waiting for other resource, including the CPU While one process is blocked, another might be able to run Multiprogramming OS accomplishes CPU sharing automatically scheduling Reduces time to run all processes
Multiprogramming
Abstract Machine Pi Abstract Machine Pj Abstract Machine Pk
OS Resource Sharing
Pi Memory Pk Memory
Time-multiplexed Physical Processor
Pj Memory
Space-multiplexed Physical Memory
Speeding Up the Car Wash
Vacuum Inside (a) The Sequential Car Wash
Wash
Dry
Vacuum Inside
Wash (b) The Parallel Car Wash
Dry
Evolution of Operating Systems
Serial Processing
No operating system. Machines run from a console with display lights and toggle switches, input device, and printer. Schedule time Setup included loading the compiler, source program, saving compiled program, and loading and linking
43
Brief History of Operating Systems Development
Second Generation
Job scheduling, JCL, faster I/O, spooling, batch, files
Recent Developments
Distributed computing, personal computers, highspeed communication, multi-media 1980 1990
1940
1955
1965
First Generation
Vacuum tube, single user, early operating systems
Third Generation
Shared processing, multiprogramming, virtual memory, DBMS
44
Types of Operating System
Mainframe operating systems Server operating systems Multiprocessor operating systems Personal computer operating systems Real-time operating systems Embedded operating systems Smart Card operating systems
45
Mainframe Systems
Reduce setup time by batching similar jobs Automatic job sequencing automatically transfers control from one job to another. First rudimentary operating system. Resident monitor
initial control in monitor control transfers to job when job completes control transfers pack to monitor
46
Reference
Chapter 1 from the text : Modern Operating Systems by Tanenbaum 2nd or 3rd Edition.
47