Скачать презентацию Slide 1 -1 Computer Systems II Gordon College Скачать презентацию Slide 1 -1 Computer Systems II Gordon College

43efca20d579df424f670efc1add8a90.ppt

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

Slide 1 -1 Computer Systems II Gordon College Operating System Overview Slide 1 -1 Computer Systems II Gordon College Operating System Overview

Class Intro • Operating System Class • Two Directions: – Practical • Linux+ Guide Class Intro • Operating System Class • Two Directions: – Practical • Linux+ Guide to Linux Certification and Lab Manual • Lab Experience – Theoretical • Operating Systems (3 rd Edition Gary Nutt) • Lecture and Projects Slide 1 -2

Why Study Operating Systems? • Understand the model of operation – Easier to see 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 • Even so, OS is pure overhead of real work • Application programs have the real value to person who buys the computer Slide 1 -3

Perspectives of the Computer print cut save send open() malloc() fork() read-disk start-printer track-mouse Perspectives of the Computer print cut save send open() malloc() fork() read-disk start-printer track-mouse Application Software System Software Hardware (b) Application Programmer View (c) OS Programmer View (a) End User (b) View Slide 1 -4

System Software • Independent of individual applications, but common to all of them • System Software • Independent of individual applications, but common to all of them • Examples –C library functions –A window system –A database management system –Resource management functions –The OS Slide 1 -5

Using the System Software Application Programmer System Software API Command Line Interpreter Compiler Loader Using the System Software Application Programmer System Software API Command Line Interpreter Compiler Loader Libraries Database Management System Window System OS Hardware Slide 1 -6

Application Software, System Software, and the OS Human-Computer Interface Application Software API System Software Application Software, System Software, and the OS Human-Computer Interface Application Software API System Software (More Abstract Resources) OS Interface Trusted OS (Abstract Resources) Software-Hardware Interface Hardware Resources Slide 1 -7

The OS as Resource Manager • Process: An executing program • Resource: Anything that The OS as Resource Manager • Process: An executing program • Resource: Anything that is needed for a process to run –Memory –Space on a disk –The CPU • “An OS creates resource abstractions” • “An OS manages resource sharing” Slide 1 -8

Resource Abstraction Slide 1 -9 load(block, length, device); seek(device, 236); out(device, 9) write(char *block, Resource Abstraction Slide 1 -9 load(block, length, device); seek(device, 236); out(device, 9) write(char *block, int len, int device, int track, int sector) {. . . load(block, length, device); seek(device, 236); out(device, 9); . . . } write(char *block, int len, int device, int addr); fprintf(file. ID, “%d”, datum);

Disk Abstractions Slide 1 -10 Application Programmer OS Programmer load(…); seek(…); out(…); (a) Direct Disk Abstractions Slide 1 -10 Application Programmer OS Programmer load(…); seek(…); out(…); (a) Direct Control void write() { load(…); seek(…) out(…) } (b) write() abstraction int fprintf(…) {. . . write(…) … } (c) fprintf() abstraction

Abstract Resources User Interface Application Abstract Resources (API) Middleware OS Resources (OS Interface) OS Abstract Resources User Interface Application Abstract Resources (API) Middleware OS Resources (OS Interface) OS Hardware Resources Slide 1 -11

Abstract Machines Slide 1 -12 Abstract Machines Idea Program Physical Machine Result Idea Program Abstract Machines Slide 1 -12 Abstract Machines Idea Program Physical Machine Result Idea Program … Result … Idea … Program Result

Resource Sharing • Space- vs time-multiplexed sharing • To control sharing, must be able Resource Sharing • Space- vs time-multiplexed sharing • To control sharing, must be able to isolate resources • OS usually provides mechanism to isolate, then selectively allows sharing – How to isolate resources – How to be sure that sharing is acceptable • Concurrency Slide 1 -13

The OS as a Conductor The OS coordinates the sharing and use of all The OS as a Conductor The OS coordinates the sharing and use of all the components in the computer Slide 1 -14

Multiprogramming Abstract Machine Pi Abstract Machine Pj Abstract Machine Pk … OS Resource Sharing 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 Slide 1 -15

Slide 1 -16 Multiprogramming(2) • Technique for sharing the CPU among runnable processes – Slide 1 -16 Multiprogramming(2) • 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

How Multiprogramming Works Process 1 Process 2 Process 3 Time-multiplexed CPU Process 4 Space-multiplexed How Multiprogramming Works Process 1 Process 2 Process 3 Time-multiplexed CPU Process 4 Space-multiplexed Memory Slide 1 -17

Speeding Up the Car Wash Vacuum Inside Wash (a) The Sequential Car Wash Vacuum Speeding Up the Car Wash Vacuum Inside Wash (a) The Sequential Car Wash Vacuum Inside Wash (b) The Parallel Car Wash Dry Slide 1 -18 Dry

Slide 1 -19 Multiprogramming Performance Pi’s Total Execution Time, ti 0 ti Time (a) Slide 1 -19 Multiprogramming Performance Pi’s Total Execution Time, ti 0 ti Time (a) Pi’s Use of Machine Resources P 1 P 2 Pi … … PN Time (a) All Processes’ Use of Machine Resources Using the processor I/O operation

OS Strategies • • Batch processing Timesharing Personal computer & workstations Process control & OS Strategies • • Batch processing Timesharing Personal computer & workstations Process control & real-time Network Distributed Small computers Slide 1 -20

Slide 1 -21 Batch Processing Job 19 Input Spooler Input Spool Job 3 Output Slide 1 -21 Batch Processing Job 19 Input Spooler Input Spool Job 3 Output Spooler Output Spool

Batch Processing(2) • • Slide 1 -22 Uses multiprogramming Job (file of OS commands) Batch Processing(2) • • Slide 1 -22 Uses multiprogramming Job (file of OS commands) prepared offline Batch of jobs given to OS at one time OS processes jobs one-after-the-other No human-computer interaction OS optimizes resource utilization Batch processing (as an option) still used today

A Shell Script Batch File Slide 1 -23 cc -g -c menu. c cc A Shell Script Batch File Slide 1 -23 cc -g -c menu. c cc -g -o driver. c menu. o driver < test_data > test_out lpr -Pthe. Printer test_out tar cvf driver_test. tar menu. c driver. c test_data test_out uuencode driver_test. tar >driver_test. encode

Timesharing Systems Abstract Machines Result Physical Machine Command Result … Command Result Command Slide Timesharing Systems Abstract Machines Result Physical Machine Command Result … Command Result Command Slide 1 -24

Timesharing Systems(2) Slide 1 -25 Computer Research Corp ‘ 67 • Uses multiprogramming • Timesharing Systems(2) Slide 1 -25 Computer Research Corp ‘ 67 • Uses multiprogramming • Support interactive computing model (Illusion of multiple consoles) • Different scheduling & memory allocation strategies than batch • Tends to propagate processes • Considerable attention to resource isolation (security & protection) • Tend to optimize response time

Personal Computers • CPU sharing among one person’s processes • Power of computing for Personal Computers • CPU sharing among one person’s processes • Power of computing for personal tasks – Graphics – Multimedia • Trend toward very small OS • OS focus on resource abstraction • Rapidly evolved to “personal multitasking” systems Slide 1 -26

Process Control & Real-Time • Computer is dedicated to a single purpose • Classic Process Control & Real-Time • Computer is dedicated to a single purpose • Classic embedded system • Must respond to external stimuli in fixed time • Continuous media popularizing real-time techniques • An area of growing interest Slide 1 -27

Networks • LAN (Local Area Network) evolution • 3 Mbps (1975) 10 Mbps (1980) Networks • LAN (Local Area Network) evolution • 3 Mbps (1975) 10 Mbps (1980) 100 Mbps (1990) 1 Gbps (2000) • High speed communication means new way to do computing – – Shared files Shared memory Shared procedures/objects ? ? ? Slide 1 -28

Distributed OS Slide 1 -29 • Wave of the future App App App Distributed Distributed OS Slide 1 -29 • Wave of the future App App App Distributed OS Multiple Computers connected by a Network

Small Computers • PDAs, STBs, embedded systems became commercially significant • Have an OS, Small Computers • PDAs, STBs, embedded systems became commercially significant • Have an OS, but – Not general purpose – Limited hardware resources – Different kinds of devices • Touch screen, no keyboard • Graffiti – Evolving & leading to new class of Oses • Palm. OS, Pocket PC (Win. CE), Vx. Works, … Slide 1 -30

Evolution of Modern OS Timesharing Memory Mgmt Scheduling Batch Protection Memory Mgmt Protection Scheduling Evolution of Modern OS Timesharing Memory Mgmt Scheduling Batch Protection Memory Mgmt Protection Scheduling Files Devices Slide 1 -31 Network OS PC & Wkstation System software Human-Computer Interface Client-Server Model Protocols Real-Time Scheduling Small Computer Modern OS Network storage, Resource management

Examples of Modern OS • UNIX variants (e. g. Linux) -- have evolved since Examples of Modern OS • UNIX variants (e. g. Linux) -- have evolved since 1970 • Windows NT/2 K -- has evolved since 1989 (much more modern than UNIX – Win 2 K = Win. NT, V 5 • Research OSes – still evolving … • Small computer OSes – still evolving … Slide 1 -32

The Microsoft OS Family Win 32 API Subset Win 32 API Sub. Set Windows The Microsoft OS Family Win 32 API Subset Win 32 API Sub. Set Windows CE (Pocket PC) Windows 95/98/Me Windows NT/2000/XP Slide 1 -33

Summary An Operating System must be able to: • provide functionality to apps • Summary An Operating System must be able to: • provide functionality to apps • provide abstraction of hardware to users and apps • provide the sharing of resources to processes • provide security and protection • be as transparent as possible • be as light as possible Slide 1 -34