DOC PREVIEW
LSU CSC 4103 - Operating System Structures

This preview shows page 1-2-21-22 out of 22 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 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 22 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 22 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 22 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1CSC 4103 - Operating SystemsFall 2009Tevfik Ko!arLouisiana State UniversityAugust 27th, 2009Lecture - IIOS StructuresAnnouncements• TA Changed. New TA:– Praveenkumar Kondikoppa– Email: [email protected]• All of you should be now in the class mailing list.– Let me know if you haven’t received any messages yet.• Lecture notes are available on the course web site.23Roadmap• Major OS Components– Corresponding OS Responsibilities• OS Design and Implementation– Different Design Approaches• OS API – System Calls– Dual Mode of Operation4Computer 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 cycles5Major OS Components!Processes!Memory management!CPU Scheduling!I/O Management6Processes"A process is the activity of executing a programPasta for six– boil 1 quart salty water – stir in the pasta– cook on medium until “al dente”– serveProgramProcessCPUinput datathread of execution7ProcessesPasta for six– boil 1 quart salty water – stir in the pasta– cook on medium until “al dente”– serve"It can be interrupted to let the CPU execute a higher-priority processProgramProcessFirst aid– Get the first aid kit– Check pulse– Clean wound with alcohol– Apply band aidCPU (changes hat to “doctor”)input datathread of execution8Processes". . . and then resumed exactly where the CPU left offPasta for six– boil 1 quart salty water – stir in the pasta– cook on medium until “al dente”– serveProgramProcessCPU (back to“chef”)input datathread of executionhmm... now where was I?9Processesjob 3job 1job 1job 2job 2job 4job 3job 1. . . . . .job 3job 1job 1job 2job 2. . . . . .job 4job 3job 1"Multitasking gives the illusion of parallel processing (independent virtual program counters) on one CPU (a) Multitasking from the CPU’s viewpointPseudoparallelism in multitaskingjob 2job 2job 3job 3job 1job 1job 1job 4(b) Multitasking from the processes’ viewpoint = 4 virtual program countersprocess 1process 2process 3process 4Processes10• Timesharing is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing– Response time should be < 1 second– Each user has at least one program loaded in memory and executing ! process11Processes"Operating System Responsibilities: The O/S is responsible for managing processes#the O/S creates & deletes processes#the O/S suspends & resumes processes#the O/S provides mechanisms for process synchronization#the O/S provides mechanisms for interprocess communication#the O/S provides mechanisms for deadlock handling12Memory Management"Main memoryThe storage hierarchy"Main memory#large array of words or bytes, each with its own address#repository of quickly accessible data shared by the CPU and I/O devices#volatile storage that loses its contents in case of system failure13Performance of Various Levels of Storage• Movement between levels of storage hierarchy can be explicit or implicit14Caching• Important principle, performed at many levels in a computer (in hardware, operating system, software)• Information in use copied from slower to faster storage temporarily• Faster storage (cache) checked first to determine if information is there– If it is, information used directly from the cache (fast)– If not, data copied to cache and used there• Cache smaller than storage being cached– Cache management important design problem– Cache size and replacement policy15Migration of Integer A from Disk to Register• Multitasking environments must be careful to use most recent value, not matter where it is stored in the storage hierarchy• Multiprocessor environment must provide cache coherency in hardware such that all CPUs have the most recent value in their cache• Distributed environment situation even more complex– Several copies of a datum can exist16Memory Management"Operating System Responsibilities: The O/S is responsible for an efficient and orderly control of storage allocation#ensures process isolation: it keeps track of which parts of memory are currently being used and by whom#allocates and deallocates memory space as needed: it decides which processes to load or swap out#regulates how different processes and users can sometimes share the same portions of memory#transfers data between main memory and disk and ensures long-term storageCPU Scheduling"Long-term scheduling"Medium-term scheduling"Short-term scheduling = CPU scheduling"I/O scheduling"Long-term scheduling#the decision to add a program to the pool of processes to be executed (job scheduling)"Medium-term scheduling#the decision to add to the number of processes that are partially or fully in main memory (“swapping”)"Short-term scheduling = CPU scheduling#the decision as to which available processes in memory are to be executed by the processor (“dispatching”)"I/O scheduling#the decision to handle a process’s pending I/O requestfrequency of interventionfine- to coarse-grain level18CPU Scheduling"Operating System Responsibilities: The O/S is responsible for efficiently using the CPU and providing the user with short response times#decides which available processes in memory are to be executed by the processor#decides what process is executed when and for how long, also reacting to external events such as I/O interrupts #relies on a scheduling algorithm that attempts to optimize CPU utilization, throughput, latency, and/or response time, depending on the system requirements19I/O ManagementDevice-independent softwareLayers of the I/O subsystemTanenbaum, A. S. (2001)Modern Operating Systems (2nd Edition). Device-independent software20Two I/O Methods• After I/O starts, control returns to user program only upon I/O completion $ synchronous– Wait instruction idles the CPU until the next interrupt– Wait loop (contention for memory access).– At most one I/O request is outstanding at a time, no simultaneous I/O processing.• After I/O starts, control returns to user program without waiting for I/O completion $asynchronous– System call – request to the operating system to allow user to wait for I/O completion.– Device-status table contains entry for each I/O device21Two I/O MethodsSynchronousAsynchronous22I/O Management"Operating System Responsibilities:


View Full Document

LSU CSC 4103 - Operating System Structures

Download Operating System Structures
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 Operating System Structures 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 Operating System Structures 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?