d597d462809e7e0f28546989e70aaf0b.ppt
- Количество слайдов: 45
G 53 OPS Operating Systems Graham Kendall Operating Systems
G 53 OPS 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.
G 53 OPS Operating Systems Introduction to Operating Systems • Give three functions of an operating system
G 53 OPS Operating Systems What is an Operating System? - 1 Word Processor Spreadsheet Accounting Compilers Editors Application Programs Command Interpreter Systems Programs Operating System Machine Language Microprogramming Physical Devices Hardware
G 53 OPS Operating Systems What is an Operating System? - 2 • Physical Devices – Integrated circuits, cathode ray tubes, wire etc. Word Processor Spreadsheet Accounting Compilers Editors Application Programs Command Interpreter Systems Programs Operating System Machine Language Microprogramming Physical Devices Hardware
G 53 OPS 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 Application Programs Systems Programs Machine Language Microprogramming Physical Devices Hardware
G 53 OPS 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 Application Programs Systems Programs Machine Language Microprogramming Physical Devices Hardware
G 53 OPS 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 Application Programs Systems Programs Machine Language Microprogramming Physical Devices Hardware
G 53 OPS 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).
G 53 OPS 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).
G 53 OPS 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 - 26 th December 1791 to 18 th October 1871
G 53 OPS 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
G 53 OPS 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
G 53 OPS 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
G 53 OPS 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.
G 53 OPS 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?
G 53 OPS Operating Systems History of Operating Systems - 5 • Fifth Generation (Sometime in the future) • What will constitute a fifth generation computer?
G 53 OPS 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
G 53 OPS 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?
G 53 OPS 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
G 53 OPS 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
G 53 OPS 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 G 2+ would schedule them – Batch programs together into a single job – Parameterised macros (or JCL – Job Control Language) allowed automation of tasks Submit many jobs at the same time so that G 2+ would run them one after another – Adjustable scheduling algorithm (via the operators console) – Other scheduling factors (e. g. tape decks or memory) – Under G 2+ the operators still look after individual jobs
G 53 OPS 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
G 53 OPS Operating Systems Case Study – 4 (ICL Mainframe Operating Systems) • George 3/4 – Operators, in some peoples opinion were little more than “tape monkeys” – G 3 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 G 2+. – It allowed interactive sessions – It had a concept of filestore
G 53 OPS 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
G 53 OPS 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 G 3, the operators control the entire system – Move towards lights out working.
G 53 OPS 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).
G 53 OPS 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
G 53 OPS 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
G 53 OPS 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.
G 53 OPS 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
G 53 OPS 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
G 53 OPS 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?
G 53 OPS 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
G 53 OPS 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 file 1 file 2 file 3 | sort > /dev/lp &
G 53 OPS 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
G 53 OPS Operating Systems Operating System Structure - 2 Main Procedure Service Procedures Utility Procedures
G 53 OPS 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.
G 53 OPS 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)
G 53 OPS 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.
G 53 OPS 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
G 53 OPS Operating Systems Operating System Structure - 7 Virtual 370’s Hardware Instructions TRAP VM/370 Bare Hardware
G 53 OPS 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
G 53 OPS 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 Server File Server Kernel Message sent from client to server Memory Server ……… Server User Mode Kernel Mode
G 53 OPS Operating Systems Graham Kendall End of Operating Systems