DOC PREVIEW
Duke CPS 110 - The Big Picture

This preview shows page 1-2-3-4 out of 11 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1CPS 110/EE 153 Course IntroCPS 110/EE 153 Course IntroThe operating system (OS) is the interface between userapplications and the hardware.An OS implements a sort of virtual machine that is easier toprogram than the raw hardware.Operating Systems: The Big PictureOperating Systems: The Big Picture[McKinley]physical machine interfaceUser ApplicationsOperating SystemArchitecturevirtual machine interface2TheOSandtheHardwareTheOSandtheHardwareThe OS is the “permanent” software with the power to:• control/abstract/mediate access to the hardwareCPUs and memoryI/O devices• so user code can be:simplerdevice-independentportableeven “transportable”I/O BusMemory BusProcessorCacheMainMemoryDiskControllerDiskDiskGraphicsControllerNetworkInterfaceGraphicsNetworkinterruptsI/O BridgeThe OS and User ApplicationsThe OS and User ApplicationsThe OS defines a framework for users and their programs tocoexist, cooperate, and work together safely, supporting:• concurrent execution/interaction of multiple user programs• shared implementations of commonly needed facilities“The system is all the code you didn’t write.”• mechanisms to share and combine software componentsExtensibility: add new components on-the-fly as they are developed.• policies for safe and fair sharing of resourcesphysical resources (e.g., CPU time and storage space)logical resources (e.g., data files, programs, mailboxes)3Overview of OS ServicesOverview of OS ServicesStorage: primitives for files and virtual memorycontrol devices and provide for the “care and feeding” of thememory system hardware and peripheralsProtection and securityset boundaries that limit damage from faults and errorsestablish user identities, priorities, and accountabilityaccess control for logical and physical resourcesExecution: primitives to create/execute programssupport an environment for developing and running applicationsCommunication: “glue” for programs to interactThe Four Faces of Your Operating SystemThe Four Faces of Your Operating System• service providerThe OS exports commonly needed facilities with standardinterfaces, so that programs can be simple and portable.• executive/bureaucrat/jugglerThe OS controls access to hardware, and allocates physicalresources (memory, disk, CPU time) for the greatest good.• caretakerThe OS monitors the hardware and intervenes to resolveexceptional conditions that interrupt smooth operation.• cop/security guardThe OS mediates access to resources and grants or denies eachrequest.4Other Useful MetaphorsOther Useful Metaphors1. Phone systemsDefines an infrastructure for users to call each other and talk.- doesn’t dictate who you call; doesn’t dictate what you say- supports services not imagined by creators, e.g., 900 numbers2. GovernmentSets rules and balances demands from a diverse community.Users/subjects want high levels of service with low taxes.3. TransportationWide range of choices for a wide range of user goals and needs.- race car: simple interface to powerful technology…goes fast…crashes hard.- cadillac: makes choices automatically…comfortable…no fun to drive.- SUV: runs on any terrain…rolls over bumps in the road…burns gas…but gas is cheap.Studying Operating SystemsStudying Operating SystemsThis course deals with “classical” operating systems issues:• the services and facilities that operating systems provide;• OS implementation on modern hardware;(and architectural support for modern operating systems)• how hardware and software evolve together;• the techniques used to implement software systems that are:large and complex,long-lived and evolving,concurrent,performance-critical.5The World TodayThe World TodayInternetLAN/SANNetworkLAN/SANNetworkClustersmobile devicesInternet appliancesdesktop clientsDatabase/File ServerThe Big QuestionsThe Big Questions1. How to divide function/state/trust across components?reason about flow of data and computation through the system2. What abstractions/interfaces are sufficiently:powerful to meet a wide range of needs?efficient to implement and simple to use?versatile to enable construction of large/complex systems?3. How can we build:reliable systems from unreliable components?trusted systems from untrusted components?unified systems from diverse components?coherent systems from distributed components?6Classical View: TheClassical View: TheQuestionsQuestionsThe basic issues/questions in this course are how to:• allocate memory and storage to multiple programs?• share the CPU among concurrently executing programs?• suspend and resume programs?• share data safely among concurrent activities?• protect one executing program’s storage from another?• protect the code that implements the protection, andmediates access to resources?• prevent rogue programs from taking over the machine?• allow programs to interact safely?Memory and the CPUMemory and the CPU02ncode libraryOS dataOS codeProgram AdataDataProgram BDataregistersCPUR0RnPCmain memoryxx7A First Look at Some Key ConceptsA First Look at Some Key ConceptskernelThe software component that controls the hardware directly, andimplements the core privileged OS functions.Modern hardware has features that allow the OS kernel to protect itselffrom untrusted user code.threadAn executing stream of instructions and its CPU register context.virtual address spaceAn execution context for thread(s) that provides an independent namespace for addressing some or all of physical memory.processAn execution of a program, consisting of a virtual address space, one ormore threads, and some OS kernel state.The KernelThe Kernel•Thekernel program resides in a well-known executable file.The “machine” automatically loads the kernel into memory(boots) on power-on or reset.• The kernel is (mostly) a library of service procedures sharedby all user programs, but the kernel is protected:User code cannot access internal kernel data structures directly.User code can invoke the the kernel only at well-defined entrypoints (system calls).• Kernel code is like user code, but the kernel is privileged:Kernel has direct access to all hardware functions, and definesthe machine entry points for interrupts and exceptions.8A Protected KernelA Protected Kernel02ncode libraryOS dataOS codeProgram AdataDataProgram BDataregistersCPUR0RnPCmain memoryxxmodeMode register bitindicates whetherthe CPU is runningin a user program orin the protectedkernel.Some instructions ordata


View Full Document

Duke CPS 110 - The Big Picture

Download The Big Picture
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view The Big Picture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The Big Picture 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?