
OperatingSystemsChapter 1Overview of an Operating System1
Operating Systems Chapter 1 Overview of an Operating System 1

ObjectivesOverviewofos-OverviewofComputerSystem:Organization&Architecture- Whatis an Oos-OsOperation:Interrupt-drivenviasystemcallMajorOS Components-ProcessManagement一MemoryManagement-StorageManagementKernelDataStructuresComputingEnvironments&Open-SourcedOs
Objectives • Overview of OS – Overview of Computer System: Organization & Architecture – What is an OS – OS Operation: Interrupt-driven via system call • Major OS Components – Process Management – Memory Management – Storage Management • Kernel Data Structures • Computing Environments & Open-Sourced OS

Before wetalkabout OS..Overview of Computer System-System Organization-Storage Structure-System Architecture3
Before we talk about OS. Overview of Computer System -System Organization -Storage Structure -System Architecture 3

ComputerSystemOrganization: Computer-system organization- One or more CPUs, device controllers connect throughcommon bus providing access to shared memory- Concurrent execution of cPUs and devices competing formemory cyclesprinterkeyboardmonitormousediskson-linediskgraphicsCPUUSBcontrollercontrolleradaptermemory
Computer System Organization • Computer-system organization – 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

Computer-SystemOrganization· I/O devices and the CPU can execute concurrently- Each device controller is in charge of a particular device typeEachdevicecontrollerhasalocal buffer-CPUmovesdatafrom/tomainmemoryto/fromlocalbuffers-Device controller informs CPU that it has finished its operation bycausinganinterrupt
Computer-System Organization • I/O devices and the CPU can execute concurrently – Each device controller is in charge of a particular device type – Each device controller has a local buffer – CPU moves data from/to main memory to/from local buffers – Device controller informs CPU that it has finished its operation by causing an interrupt

ComputerStartup· bootstrap program is loaded at power-up or reboot-TypicallystoredinROMorEPROM,generallyknownasfirmware- Initializes all aspects of system Loads operating system kernel into memory and startsexecution: System processes or system daemons- Run the entire time the kernel is running- On UNIX, the first system process is "init" After fully booted, waits for events to occur-Signaledbyinterrupt
Computer Startup • bootstrap program is loaded at power-up or reboot – Typically stored in ROM or EPROM, generally known as firmware – Initializes all aspects of system – Loads operating system kernel into memory and starts execution • System processes or system daemons – Run the entire time the kernel is running – On UNIX, the first system process is “init” • After fully booted, waits for events to occur – Signaled by interrupt

InterruptHandlingInterrupt can be triggered by hardware or softwareHardwaresendssignaltoCPU- Software executes a special operation: system callInterrupt procedure- CPU stops what is doing- Execute the service routine for the interrupt-CPUresumes? Operating system is interrupt driven
Interrupt Handling • Interrupt can be triggered by hardware or software – Hardware sends signal to CPU – Software executes a special operation:system call • Interrupt procedure – CPU stops what is doing – Execute the service routine for the interrupt – CPU resumes • Operating system is interrupt driven

InterruptTimelineCPUuserprocessexecutingVOinterruptprocessingVOidledevicetransferring1/O1/Otransfertransferdonedonerequestrequest
Interrupt Timeline

CommonFunctionsofInterruptsEach computer design has its own interrupt mechanismInterrupt transfers control to the interrupt service routine- A table of pointers to interrupt routines, the interrupt vector, canbe used to provide necessaryspeedThetable of pointers is stored inlowmemoryInterrupt architecture must save the address of theinterruptedinstruction- Modern architectures store the return address on system stack
Common Functions of Interrupts • Each computer design has its own interrupt mechanism • Interrupt transfers control to the interrupt service routine – A table of pointers to interrupt routines, the interrupt vector, can be used to provide necessary speed – The table of pointers is stored in low memory • Interrupt architecture must save the address of the interrupted instruction – Modern architectures store the return address on system stack

Overview of Computer System-System Organization-Storage Structure-System Architecture10
Overview of Computer System -System Organization -Storage Structure -System Architecture 10