Скачать презентацию OPERATING SYSTEMS HISTORY OVERVIEW 3 17 2018 1 HARDWARE Скачать презентацию OPERATING SYSTEMS HISTORY OVERVIEW 3 17 2018 1 HARDWARE

1fd02dd351ee80e94add5be41a4b287f.ppt

  • Количество слайдов: 35

OPERATING SYSTEMS HISTORY/OVERVIEW 3/17/2018 1 OPERATING SYSTEMS HISTORY/OVERVIEW 3/17/2018 1

HARDWARE • • • One or more processors Memory Disks Printers Keyboard Mouse Monitor HARDWARE • • • One or more processors Memory Disks Printers Keyboard Mouse Monitor Network interfaces Other I/O devices

HARDWARE, OS, USER SOFTWARE Where the operating system fits in. Tanenbaum & Bo, Modern HARDWARE, OS, USER SOFTWARE Where the operating system fits in. Tanenbaum & Bo, Modern Operating Systems: 4 th ed. , (c) 2013 Prentice-Hall, Inc. All rights reserved.

TWO MODES • OS mostly runs in kernel mode • Access to all of TWO MODES • OS mostly runs in kernel mode • Access to all of hardware • Can execute all machine instructions • All other software runs in user mode • Only a subset of machine instructions are available • In particular: instructions that control the operation of the computer and perform i/o are off limits • The Tanenbaum Distinction • Don’t like your text editor? Load in a new one • Don’t like the process scheduler? Find a new OS 3/17/2018 4

TWO TASKS OF O/S • Shield the user from the complexity of the underlying TWO TASKS OF O/S • Shield the user from the complexity of the underlying hardware • Allocate resources to competing users 3/17/2018 5

TASK 1: SHIELD THE USER Operating systems turn ugly hardware into beautiful abstractions. Tanenbaum TASK 1: SHIELD THE USER Operating systems turn ugly hardware into beautiful abstractions. Tanenbaum & Bo, Modern Operating Systems: 4 th ed. , (c) 2013 Prentice-Hall, Inc. All rights reserved.

AN EXAMPLE • Read/Write in C • open(), close(), scanf(), fprintf(), etc. • But AN EXAMPLE • Read/Write in C • open(), close(), scanf(), fprintf(), etc. • But (to use an old example) NEC PD 765 controller for floppy disk drive has • 16 commands to read, write, move disk arm, format tracks, reset • read/write has 13 parameters that specify sectors/track, intersector gap, etc. • Commands to monitor the status of the motor • After each operation, chip returns 23 status and error fields 3/17/2018 7

TASK 2: RESOURCE ALLOCATOR • O/S allocates • • • cpu printer memory etc. TASK 2: RESOURCE ALLOCATOR • O/S allocates • • • cpu printer memory etc. Between competing users/processes Evolution of O/S Traces these Two functions 3/17/2018 8

I. IN THE BEGINNING • • • 3/17/2018 Reserve computer time Load program an I. IN THE BEGINNING • • • 3/17/2018 Reserve computer time Load program an instruction at a time using switches or plug boards Monitor program’s execution Issues Under reserved? Machine is idle Over reserved? Wait your turn Programmer had to understand machine internals 9

IN THE BEGINNING: ENIAC PROGRAMMERS 3/17/2018 10 IN THE BEGINNING: ENIAC PROGRAMMERS 3/17/2018 10

II. PROGRAMMER AS OPERATOR • • Development of tape drives, line printers, card readers, II. PROGRAMMER AS OPERATOR • • Development of tape drives, line printers, card readers, compilers, i/o libraries Steps 1. Load COBOL compiler from tape 2. Read in program from card reader 3. Link program with stored libraries 4. Load executable 5. Run/Debug Notice: Steps 1 -4 are all setup 3/17/2018 11

III. ENTER THE OPERATOR Ancestor of the modern systems administrator • Eliminate the reservations III. ENTER THE OPERATOR Ancestor of the modern systems administrator • Eliminate the reservations system • Hire operator to load punched jobs • Batch similar jobs together (i. e. , all Fortran jobs so that Fortran compiler needs to be loaded only once) Problems. When error occurs, operator must: • Notice them • Record status • Start next job • Meanwhile fabulously expensive CPU is idle • 3/17/2018 12

IV. RESIDENT OPERATOR Replace operator with: • Program loader • Job sequencer • Control IV. RESIDENT OPERATOR Replace operator with: • Program loader • Job sequencer • Control card interpreter 3/17/2018 13

INFO REQUIRED FOR EACH JOB • Card deck included: • • • Account to INFO REQUIRED FOR EACH JOB • Card deck included: • • • Account to be billed Job name cpu limit Compiler name Load/run directives Dispostion of output Program cards Data cards End of job card 3/17/2018 14

CARD DECK Figure 1 -4. Structure of a typical FMS job. Tanenbaum & Bo, CARD DECK Figure 1 -4. Structure of a typical FMS job. Tanenbaum & Bo, Modern Operating Systems: 4 th ed. , (c) 2013 Prentice-Hall, Inc. All rights reserved.

DIRECT ANCESTOR OF • • • JCL – IBM DCL – DEC ECL – DIRECT ANCESTOR OF • • • JCL – IBM DCL – DEC ECL – Sperry Various Shells – Unix MS-DOS Command Line -- Microsoft 3/17/2018 16

3/17/2018 17 3/17/2018 17

YET MORE PROBLEMS • Have eliminated much human intervention • Mechanical i/o devices are YET MORE PROBLEMS • Have eliminated much human intervention • Mechanical i/o devices are much slower than CPU • So, CPU waits for IO 3/17/2018 18

V: MULTIPROGRAMMING Partition memory. When a job is stopped waiting for i/o, switch to V: MULTIPROGRAMMING Partition memory. When a job is stopped waiting for i/o, switch to another job Tanenbaum & Bo, Modern Operating Systems: 4 th ed. , (c) 2013 Prentice-Hall, Inc. All rights reserved.

VI: SPOOLING • Simultaneous peripheral operation offline • Input • Cards read directly to VI: SPOOLING • Simultaneous peripheral operation offline • Input • Cards read directly to secondary storage device (tape, drum, disk) • When job is finished, o/s loads a new one in the empty slot • Output • Print jobs written to secondary storage • When device is free, print 3/17/2018 20

KEY CONSEQUENCE OF SPOOLING • Job Pool • Many jobs have been read in KEY CONSEQUENCE OF SPOOLING • Job Pool • Many jobs have been read in • o/s can decide which to run next based on a priority scheme • Leads to development of scheduling algorithms • Short leap to timesharing 3/17/2018 21

VI: TIME SHARING • Logical extension of multiprogramming • Developed to give many users VI: TIME SHARING • Logical extension of multiprogramming • Developed to give many users the illusion of complete CPU attention • Context Switch switching occurs so quickly that multiple users may interact with multiple programs as they are running. 3/17/2018 22

VII: VIRTUAL MEMORY • But memory is finite • Load only the most heavily VII: VIRTUAL MEMORY • But memory is finite • Load only the most heavily executed pieces of a program into memory • Keep the rest on (much cheaper/slower) disk • Requires a memory management unit to convert virtual addresses to physical address on the fly 3/17/2018 23

VIII: VIRTUAL MACHINES • Create the illusion of multiple operating systems running on the VIII: VIRTUAL MACHINES • Create the illusion of multiple operating systems running on the same physical hardware • IBM’s CP/CMS and VM/370 (early seventies) • Virtual. Box, VMware (current) 3/17/2018 24

THREE KINDS OF PROCESSING: BATCH • Resident monitor enabled 1 st batch systems • THREE KINDS OF PROCESSING: BATCH • Resident monitor enabled 1 st batch systems • Collect similar jobs together, so that you have to load (e. g. ) the COBOL compiler only once • No longer true. Batch jobs are context-switched like interactive jobs • Defining Feature • Lack of interaction between user and job • Often those that are compute/data intensive • Run (e. g. ) at night 3/17/2018 25

THREE KINDS OF PROCESSING: TRANSACTION • Short jobs requiring human interaction • Requires both THREE KINDS OF PROCESSING: TRANSACTION • Short jobs requiring human interaction • Requires both multiprogramming and timesharing • Defining Feature • Human i/o (e. g. ATM) 3/17/2018 26

THREE KINDS OF PROCESSING: REAL TIME • Where • Industrial control systems • Weapons THREE KINDS OF PROCESSING: REAL TIME • Where • Industrial control systems • Weapons systems • Car fuel systems • Defining Feature • Processing must be completed within a fixed time • A correct answer that arrives after it’s need is not correct • Robot assembly line 3/17/2018 27

O/S MILESTONES (1) • IBSYS • Fifties • Resident monitor • IBM 1401/7094 • O/S MILESTONES (1) • IBSYS • Fifties • Resident monitor • IBM 1401/7094 • OS/360 • • Sixties IBM 360 Multiprogramming Frederick Brooks, The Mythical Man-Month • CTSS (Conversational Timesharing System) • Early sixties • MIT for IBM 7098 • Early version of time sharing 3/17/2018 28

O/S MILESTONES (2) • Multics • • Mid sixties MIT, Bell Labs, GE Many O/S MILESTONES (2) • Multics • • Mid sixties MIT, Bell Labs, GE Many seminal o/s ideas, time-sharing in particular Idea of a computer utility • OS/370 • Time sharing • Virtual memory (but Manchester Atlas was first VM machine) 3/17/2018 29

O/S MILESTONES (3) • Unix • Ken Thompson worked on Multics • He and O/S MILESTONES (3) • Unix • Ken Thompson worked on Multics • He and Dennis Ritchie create a stripped-down, one user version of Multics • Early seventies • DEC PDP-7 • Later ported to a PDP-11: led to the idea that an o/s does not have to be hardware specific • Closely related: PDP-11 version written in C (Kernighan and Ritchie) 3/17/2018 30

O/S MILESTONES (4) • MS-DOS • Early 80 s • Built for IBM to O/S MILESTONES (4) • MS-DOS • Early 80 s • Built for IBM to exploit mass-marketed 8086 • Preceded by CP/M (Gary Kildall, consultant to Intel) • Minix • Mid 80 s • Teaching version of Unix to run on intel processors 3/17/2018 31

O/S MILESTONES (4) • Linux • 90’s • Fully-featured o/s • Linus Thorvalds Hello O/S MILESTONES (4) • Linux • 90’s • Fully-featured o/s • Linus Thorvalds Hello everybody out there using minix - I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since april, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) among other things). I've currently ported bash(1. 08) and gcc(1. 40), and things seem to work. This implies that I'll get something practical within a few months, and I'd like to know what features most people would want. Any suggestions are welcome, but I won't promise I'll implement them : -) Linus ([email protected] helsinki. fi) PS. Yes – it's free of any minix code, and it has a multi-threaded fs. It is NOT portable (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that's all I have : -(. 3/17/2018 32

O/S MILESTONES (5) • Windowing Systems • Doug Engelbart SRI, Xerox Parc mouse, windows O/S MILESTONES (5) • Windowing Systems • Doug Engelbart SRI, Xerox Parc mouse, windows etc. • Steve Jobs saw it during a visit Macintosh • Microsoft Windows in all of its incarnations 3/17/2018 33

OS MILESTONES (6) • Virtual Machines • Create the illusion of multiple operating systems OS MILESTONES (6) • Virtual Machines • Create the illusion of multiple operating systems running on the same physical hardware • IBM’s CP/CMS and VM/370 (early seventies) • Virtual. Box, VMware (current) 3/17/2018 34

OS MILESTONES (7) • Mobile Computing • 1990 s: Combine personal digital assistant (PDA) OS MILESTONES (7) • Mobile Computing • 1990 s: Combine personal digital assistant (PDA) and mobile phone • Term “smartphone” coined in 1997 • Current Dominant OS • Linux-based Android from Google • i. OS from Apple 3/17/2018 35