Unformatted text preview:

1 32 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Operating System Operations cont cid 0 cid 0 cid 0 Dual mode operation allows OS to protect itself and other systemcomponents User mode and kernel mode Mode bit provided by hardware Provides ability to distinguish when system is running usercode or kernel code Some instructions designated as privileged only executablein kernel mode System call changes mode to kernel return from call resetsit to user Increasingly CPUs support multi mode operations i e virtual machine manager VMM mode for guest VMs 1 33 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Transition from User to Kernel Mode Timer to prevent in nite loop process hogging resources Timer is set to interrupt the computer after some time period Keep a counter that is decremented by the physical clock Operating system set the counter privileged instruction When counter zero generate an interrupt Set up before scheduling process to regain control or terminateprogram that exceeds allotted time 1 34 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Process Management A process is a program in execution It is a unit of work within thesystem Program is a passive entity process is an active entity Process needs resources to accomplish its task CPU memory I O les Initialization data Process termination requires reclaim of any reusable resources Single threaded process has one program counter specifyinglocation of next instruction to execute Process executes instructions sequentially one at a time untilcompletion Multi threaded process has one program counter per thread Typically system has many processes some user some operatingsystem running concurrently on one or more CPUs Concurrency by multiplexing the CPUs among the processes threads 1 35 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Process Management Activities Creating and deleting both user and system processes Suspending and resuming processes Providing mechanisms for process synchronization Providing mechanisms for process communication Providing mechanisms for deadlock handling The operating system is responsible for the following activities inconnection with process management 1 36 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Memory Management To execute a program all or part of the instructions must be inmemory All or part of the data that is needed by the program must be inmemory Memory management determines what is in memory and when Optimizing CPU utilization and computer response to users Memory management activities Keeping track of which parts of memory are currently beingused and by whom Deciding which processes or parts thereof and data to moveinto and out of memory Allocating and deallocating memory space as needed 1 37 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Storage Management cid 0 cid 0 cid 0 cid 0 cid 0 OS provides uniform logical view of information storage Abstracts physical properties to logical storage unit le Each medium is controlled by device i e disk drive tape drive Varying properties include access speed capacity data transfer rate access method sequential or random File System management Files usually organized into directories Access control on most systems to determine who can accesswhat OS activities include Creating and deleting les and directories Primitives to manipulate les and directories Mapping les onto secondary storage Backup les onto stable non volatile storage media 1 38 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Mass Storage Management Usually disks used to store data that does not t in main memory ordata that must be kept for a long period of time Proper management is of central importance Entire speed of computer operation hinges on disk subsystem and itsalgorithms OS activities Free space management Storage allocation Disk scheduling Some storage need not be fast Tertiary storage includes optical storage magnetic tape Still must be managed by OS or applications Varies between WORM write once read many times and RW read write 1 39 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Performance of Various Levels of Storage Movement between levels of storage hierarchy can be explicit or implicit 1 40 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Migration of data A from Disk to Register Multitasking environments must be careful to use most recent value no matter where it is stored in the storage hierarchy Multiprocessor environment must provide cache coherency inhardware such that all CPUs have the most recent value in theircache Distributed environment situation even more complex Several copies of a datum can exist Various solutions covered in Chapter 17 1 41 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition I O Subsystem One purpose of OS is to hide peculiarities of hardware devices fromthe user I O subsystem responsible for Memory management of I O including buffering storing datatemporarily while it is being transferred caching storing partsof data in faster storage for performance spooling theoverlapping of output of one job with input of other jobs General device driver interface Drivers for speci c hardware devices 1 42 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Protection and Security Protection any mechanism for controlling access of processes orusers to resources de ned by the OS Security defense of the system against internal and external attacks Huge range including denial of service worms viruses identitytheft theft of service Systems generally rst distinguish among users to determine who cando what User identities user IDs security IDs include name and associatednumber one per user User ID then associated with all les processes of that user todetermine access control Group identi er group ID allows set of users to be de ned andcontrols managed then also associated with each process le Privilege escalation allows user to change to effective ID with morerights 1 43 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Kernel Data Structures Many similar to standard programming data structures Singly linked list Doubly linked list Circular linked list 1 44 Silberschatz Galvin and Gagne 2013 Operating System Concepts 9th Edition Kernel Data Structures Binary


View Full Document

Anna CS 3291 - Operating-System Operation

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