OPERATING SYSTEM Silberschatz,Galvin and Gagne c2007
Silberschatz, Galvin and Gagne ©2007 OPERATING SYSTEM
OBJECTIVES o To provide coverage of basic computer system organization o To provide a grand tour of the major operating systems components o http://developer.android.com/sdk/index.html
OBJECTIVES To provide coverage of basic computer system organization To provide a grand tour of the major operating systems components http://developer.android.com/sdk/index.html
COMPUTER SYSTEM ORGANIZATION o Computer-system operation One or more CPUs,device controllers connect through common bus providing access to shared memory Concurrent execution of CPUs and devices competing for memory cycles mouse keyboard printer monitor disks on-line CPU disk controller USB controller graphics adapter memory
COMPUTER SYSTEM ORGANIZATION Computer-system operation One or more CPUs, device controllers connect through common bus providing access to shared memory Concurrent execution of CPUs and devices competing for memory cycles 粗略的了解
OS TOOL:VIRTUAL MACHINE ABSTRACTION Application Virtual Machine Interface Operating System Physical Machine Interface Hardware o Software Engineering Problem: ·Turn hardware./software quirks→ what programmers want/need Optimize for convenience,utilization,security,reliability, etc... o For Any OS area (e.g.file systems,virtual memory, networking,scheduling): o What's the hardware interface?(physical reality) What's the application interface?(nicer abstraction)
OS TOOL: VIRTUAL MACHINE ABSTRACTION Software Engineering Problem: Turn hardware/software quirks what programmers want/need Optimize for convenience, utilization, security, reliability, etc… For Any OS area (e.g. file systems, virtual memory, networking, scheduling): What’s the hardware interface? (physical reality) What’s the application interface? (nicer abstraction) Application Operating System Hardware Physical Machine Interface Virtual Machine Interface
COMPUTER SYSTEM STRUCTURE o Computer system can be divided into four components Hardware-provides basic computing resources oCPU,memory,I/O devices ·Operating system o Controls and coordinates use of hardware among various applications and users Application programs-define the ways in which the system resources are used to solve the computing problems of the users o Word processors,compilers,web browsers,database systems,video games 。Users o People,machines,other computers
COMPUTER SYSTEM STRUCTURE Computer system can be divided into four components Hardware – provides basic computing resources CPU, memory, I/O devices Operating system Controls and coordinates use of hardware among various applications and users Application programs – define the ways in which the system resources are used to solve the computing problems of the users Word processors, compilers, web browsers, database systems, video games Users People, machines, other computers
FOUR COMPONENTS OF A COMPUTER SYSTEM user user user user 1 2 3 n compiler assembler text editor database system system and application programs operating system computer hardware
FOUR COMPONENTS OF A COMPUTER SYSTEM
OPERATING SYSTEM DEFINITION o Os is a resource allocator ·Manages all resources Decides between conflicting requests for efficient and fair resource use o OS is a control program Controls execution of programs to prevent errors and improper use of the computer
OPERATING SYSTEM DEFINITION OS is a resource allocator Manages all resources Decides between conflicting requests for efficient and fair resource use OS is a control program Controls execution of programs to prevent errors and improper use of the computer
OPERATING SYSTEM DEFINITION (CONT.) o No universally accepted definition o"Everything a vendor ships when you order an operating system"is good approximation 。But varies wildly o "The one program running at all times on the computer"is the kernel.Everything else is either a system program (ships with the operating system)or an application program
OPERATING SYSTEM DEFINITION (CONT.) No universally accepted definition “Everything a vendor ships when you order an operating system” is good approximation But varies wildly “The one program running at all times on the computer” is the kernel. Everything else is either a system program (ships with the operating system) or an application program
WHAT DOES AN OPERATING SYSTEM DO? o Silerschatz and Gavin: “An OS is Similar to a government” 0 Coordinator and Traffic Cop: Manages all resources Settles conflicting requests for resources Prevent errors and improper use of the computer o Facilitator: Provides facilities that everyone needs Standard Libraries,Windowing systems Make application programming easier,faster,less error-prone o Some features reflect both tasks: E.g.File system is needed by everyone (Facilitator) But File system must be Protected(Traffic Cop)
WHAT DOES AN OPERATING SYSTEM DO? Silerschatz and Gavin: “An OS is Similar to a government” Coordinator and Traffic Cop: Manages all resources Settles conflicting requests for resources Prevent errors and improper use of the computer Facilitator: Provides facilities that everyone needs Standard Libraries, Windowing systems Make application programming easier, faster, less error-prone Some features reflect both tasks: E.g. File system is needed by everyone (Facilitator) But File system must be Protected (Traffic Cop)