Transcript
Page 1: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPSOperating Systems

Graham KendallOperating Systems

Page 2: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Introduction to Operating Systems

• This section of the course based on (Tanenbaum, 1992) Chapter 1

• Module Content – What is an Operating System?

– History of Operating Systems

– Operating System Concepts

– Operating System Structure

• References– Levy, S. 1994. Hackers.

– Tanenbaum, A., S. 1992. Modern Operating Systems. Prentice Hall.

Page 3: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Introduction to Operating Systems

• Give three functions of an operating system

Page 4: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

What is an Operating System? - 1

Word Processor Spreadsheet Accounting

Compilers Editors Command Interpreter

Operating System

Machine Language

Microprogramming

Physical Devices

Hardware

Systems Programs

Application Programs

Page 5: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

What is an Operating System? - 2

• Physical Devices – Integrated circuits, cathode ray tubes, wire etc.

Word Processor Spreadsheet Accounting

Compilers Editors Command Interpreter

Operating System

Machine Language

Microprogramming

Physical Devices

Hardware

Systems Programs

Application Programs

Page 6: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

What is an Operating System? - 2

• Microprogramming– Firmware

– Provides basic operations that allow communication with the physical devices

– Normally in Read Only Memory (and that is why it is called firmware)

Word Processor Spreadsheet Accounting

Compilers Editors Command Interpreter

Operating System

Machine Language

Microprogramming

Physical Devices

Hardware

Systems Programs

Application Programs

Page 7: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

What is an Operating System? - 3

• Machine Language– Defines the instruction set of the computer

– Software but is considered as hardware

Word Processor Spreadsheet Accounting

Compilers Editors Command Interpreter

Operating System

Machine Language

Microprogramming

Physical Devices

Hardware

Systems Programs

Application Programs

Page 8: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

What is an Operating System? - 3

• Operating System– Layer between the hardware and the software

– Allows us to use the hardware in a user friendly way

– Layer of abstraction

Word Processor Spreadsheet Accounting

Compilers Editors Command Interpreter

Operating System

Machine Language

Microprogramming

Physical Devices

Hardware

Systems Programs

Application Programs

Page 9: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Other Views of an Operating System - 1

• A Resource Manager– Operating System is seen as a way of providing the

users of the computer with the resources they need at any given time.

– Some resource requests may not be able to be met (memory, CPU usage etc.) but the operating system is able to deal with scheduling problems such as these.

– Other resources have a layer of abstraction placed between them and the physical resource (e.g. a printer).

Page 10: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Other Views of an Operating System - 2

• Extended or Virtual Machine– The operating system is seen as a way of not having to

deal with the complexity of the hardware (e.g. floppy disc controller).

Page 11: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 1

• Charles Babbage - Analytical Engine. – Attributed with designing the first digital computer

– Never built the computer

– No operating system.

• Charles Babbage - 26th December 1791 to 18th October 1871

Page 12: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 1

• First Generation (1945-1955)– Developed during the war

– Vacuum Tubes

– Many people were developing automatic calculating machines

– Filled entire rooms

– No operating system

– No programming languages

– Had to physically wire the computer to carry out the intended instructions

Page 13: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 2

• Second Generation (1955-1965)– Transistors

– More reliable

– Became feasible to manufacture computers that could be sold to customers

– Job of computer operator invented

– Batch jobs introduced in order to improve throughput (via tapes)

– Can be seen as the first operating system

Page 14: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 3

• Third Generation (1965-1980)– Integrated Circuits as a replacement for transistors

– IBM introduced its System/360 range and ICL introduced its 1900 range

– The start of multiprogramming which led to a need for a more complex operating system – but no virtual memory

– Spooling – both input and output

– Concept of time sharing introduced which allows interactive working

– Operating systems had to become a lot more complex in order to deal with all these issues

Page 15: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 4

• Fourth Generation (1980-present) – Large Scale Integration (LSI)

– Led directly to the development of the personal computer (PC)

– One of the requirements for the original IBM PC was an operating system - Bill Gates supplied MS-DOS

– On non-Intel processors, the UNIX operating system was also being used.

Page 16: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 7

• Another View– First, Second and Third generation as before and for

same reasons

– Fourth generation started in 1971 with the introduction of LSI, then VLSI (Very Large Scale Integration) and then ULSI (Ultra Large Scale Integration)

– Really, just arguing about when the PC revolution started. Was it in the early 70’s when LSI first became available? Or was it in 1980, when the IBM PC was launched?

Page 17: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 5

• Fifth Generation (Sometime in the future)

• What will constitute a fifth generation computer?

Page 18: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 5

• Fifth Generation (Sometime in the future)– Computer generations were influenced by new

hardware (vacuum tubes, transistors, integrated circuits and LSI).

– Fifth generation may break with that tradition

– One view is that a fifth generation computer will interact with humans in a way that is natural to us Computers will be able to reason in a way that imitates humans

– Being able to accept (and understand!) the spoken word and carry out reasoning is complex, requiring advances in software and maybe hardware

Page 19: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 6

• Fifth Generation (Sometime in the future)

• What advances will have to be made to allow a fifth

generation computer to be realised?

Page 20: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

History of Operating Systems - 6

• Fifth Generation (Sometime in the future)

– Advances will be needed in AI including NLP

– Maybe need parallel processing

– Maybe a non-silicon computer

– The first time a generation has not been motivated by advances in hardware

Page 21: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Case Study – 1 (ICL Mainframe Operating Systems)

• Manual Executive– Introduced with its 1900 range

– Manual operating system

– Operators had to load and run each program

Page 22: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Case Study – 2 (ICL Mainframe Operating Systems)

• George 1/2/2+– GEneral ORGanisational Environment

– Ran “on top” of manual exec - so it was not an operating system as such

– Allowed you to submit jobs to the machine and G2+ would schedule them

– Batch programs together into a single job

– Parameterised macros (or JCL – Job Control Language) allowed automation of tasksSubmit many jobs at the same time so that G2+ would run them one after another

– Adjustable scheduling algorithm (via the operators console)

– Other scheduling factors (e.g. tape decks or memory)

– Under G2+ the operators still look after individual jobs

Page 23: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Case Study – 3 (ICL Mainframe Operating Systems)

• George 3/4– Operators no longer looked after individual jobs.

Instead they looked after the system

– Jobs could be submitted via interactive terminals by a scheduling team

– Development staff could issue batch jobs and also runs jobs in an interactive environment.

– Any problems were referred to development or technical staff

Page 24: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Case Study – 4 (ICL Mainframe Operating Systems)

• George 3/4– Operators, in some peoples opinion were little more

than “tape monkeys”

– G3 was an operating system in its own right

– To use the machine you had to run the job in a user

– The Job Control Language (JCL) was much more extensive than that of G2+.

– It allowed interactive sessions

– It had a concept of filestore

Page 25: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Case Study – 5 (ICL Mainframe Operating Systems)

• VME (Virtual Machine Environment)– Still the operating system used on ICL mainframes

today – and the foreseeable future

– VME creates virtual machines that jobs run in. If you log onto VME, you will create a virtual machine.

– VME is written to cater for the many different workloads that mainframes have to perform

– Job control language which (SCL) is a lot more sophisticated

Page 26: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Case Study – 6 (ICL Mainframe Operating Systems)

• VME (Virtual Machine Environment)– Still concept of filestore – but all disc based

– Amount of filestore available to users or group of users is under the control of the operating system (and thus the technical support teams).

– Like G3, the operators control the entire system

– Move towards lights out working.

Page 27: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Concepts - 1

• System Calls

• Each system call has a procedure associated with it so that system calls can be done in a familiar way.

• The procedures places the parameters into registers and informs the operating system

• OS is informed via a TRAP instruction (sometimes known as a kernel call or a supervisor call).

Page 28: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Concepts - 2

• CPU switches from user mode to kernel (or supervisor) mode

• After carrying out the work the operating system will return a result in the same way as a user written function written in a high level language.

• Example of an operating system call (via a procedure) is– count = read(file, buffer, nbytes);

• Use system calls to manipulate objects

Page 29: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Concepts - 2

• Give some examples of processes that should only be

allowed in kernel (supervisor) mode

• Disable all interrupts

• Set the time of day

• Change the memory map

Page 30: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Concepts - 3

• Processes– A running program with all the other information that

is needed to control its execution

– Needs to be able to start a process from exactly the same point as it was left.

– Process information held in a process table.

– A process may create a child process.

– One of the main tasks of an operating system is to schedule processes

– Processes may also communicate with other processes. The OS must deal with this.

Page 31: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Concepts - 4

• Files

• System calls to (for example) create files, delete files, move files, rename files, copy files, open files, close file, read files, write files.

• Files and Directories

Page 32: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Concepts - 5

• Example of abstraction– Text and binary files

– Standard input and standard output

– Pipes.• DIR | SORT

– Redirection• DIR > dir.txt

Page 33: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Concepts - 6

• The Shell

• Allows the user to interact with the OS

• For example, by means of a CLI or a graphical user interface

• Is the shell part of the OS. If not why not?

Page 34: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Concepts - 6

• Is the shell part of the OS. If not why not?

• No

• Less flexibility

• Making it a separate program allows different users to have different shells

• In general, the more code outside of the OS, the better

Page 35: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Concepts - 6

• The Shell

• Shell is not part of the operating system but worth mentioning as it makes heavy use of operating system features

• Example (in UNIX this time)– cat file1 file2 file3 | sort > /dev/lp &

Page 36: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Structure - 1

• How is an OS structured internally (up to now – only an external view)?

• Monolithic Systems

• No structure at all

• OS is simply a collection of procedures

• OS is constructed by compiling all the procedures into one huge monolithic system

• But they can naturally fall into a structure

Page 37: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Structure - 2

Main Procedure

Service Procedures

Utility Procedures

Page 38: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Structure - 3

• Layered Systems– Layer 0 was responsible for the

multiprogramming aspects of the operating system. It decided which process was allocated to the CPU. It dealt with interrupts and performed the context switches when a process change was required.

– Layer 1 was concerned with allocating memory to processes.

– Layer 2 deals with inter-process communication and communication between the operating system and the console.

Page 39: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Structure - 4

• Layered Systems– Layer 3 managed all I/O between the devices

attached to the computer. This included buffering information from the various devices.

– Layer 4 was where the user programs were stored.

– Layer 5 was the overall control of the system (called the system operator)

Page 40: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Structure - 5

• Moving through the hierarchy (from 0 to 5) you do not worry about the layers you have “left behind”

• For example, user programs (level 4) do not have to worry about where they are stored in memory or if they are currently allocated to the processor or not, as these are handled in level 0 and level 1.

Page 41: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Structure - 6

• Virtual Machines• Virtual machine?

– MS-DOS prompt from with Windows 95/98/NT– ICL’s mainframe operating system is called VME (Virtual

Machine Environment)

• Both of these (Windows 95/98/NT and VME) are recent developments

• VM/370 was one of the first OS’s to provide a virtual machine to each user

• Each user was even able to run different operating systems

Page 42: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Structure - 7

VM/370

370 Bare Hardware

Virtual 370’s

HardwareInstructions

TRAP

Page 43: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Structure - 8

• Client-Server Model

• Server provides services to any client that requests it

• Model is heavily used in distributed systems– E.g. print server or database

• Operating systems can be designed as a client/server

Page 44: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPS Operating SystemsG53OPS Operating Systems

Operating System Structure - 9

• Benefits include– Can result in a minimal kernel

– As each server is managing one part of the operating system, the procedures can be better structured and more easily maintained.

– If a server crashes it is less likely to bring the entire machine down as it won’t be running in kernel mode. Only the service that has crashed will be affected.

Client Process

Client Process

Process Server

File Server Memory Server

……… Server

Kernel

User Mode

Kernel Mode

Message sent from client to server

Page 45: G53OPS Operating Systems Graham Kendall Operating Systems

G53OPSOperating Systems

Graham KendallEnd of Operating Systems


Recommended