Outline for EECS 678 with Professor Kulkarni at KU 2
Outline for EECS 678 with Professor Kulkarni at KU 2
Popular in Course
Popular in Department
This 29 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at Kansas taught by a professor in Fall. Since its upload, it has received 21 views.
Reviews for Outline for EECS 678 with Professor Kulkarni at KU 2
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 02/06/15
Introduction Outline What does the operating system do Where does the operating system fit in a computing system What are the general operating system functions Who needs an operating system What is an operating system History of operating systems EECS 678 Operating System Fundamentals Spring 2009 5 User39s View of the Operating System Make it easier to write programs provide an abstraction over the hardware Provide more powerful instructions than the ISA eg writefileno buf len Make it easy to run programs loading program into memory initializing program state maintaining program counter stopping the program instead user types gcc he110c and then a0ut Utilities for multiuser mode operation resource management security fairness performance EECS 678 Operating System Fundamentals Spring 2009 ESystem39s View of the Operating System 08 as a resource allocator manage CPU time memory space file storage space lO devices network etc fairly resolve conflicting requests for hardware resources from multiple user programs 08 as a control program control the various lO devices and user programs EECS 678 Operating System Fundamentals Spring 2009 3 g What Does an Operating System Do 08 is a program that acts as an intermediary between a user of a computer and the computer hardware provide an environment for easy efficient program execution Operating system goals execute user programs and make solving user problems easier make the computer system convenient to use use the computer hardware in an efficient manner Definition everything that a vendor ships when you order an 0 S program that is always running on the computer ke me I EECS 678 Operating System Fundamentals Spring 2009 4 5 Components of a Computer System user user user user 1 2 3 quot 39 n compiler assembler text editor database system system and application programs operating system computer hardware EECS 678 Operating System Fundamentals Spring 2009 if Components of a Computer System Hardware provides basic computing resources CPU memory lO 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 EECS 678 Operating System Fundamentals Spring 2009 6 5 Computer System Operation Bootstrap program for the computer to start running initialize CPU registers device controllers memory contents locate and load the OS kernel 08 starts executing the first program waits for some event to occur interruptdriven Occurrence of an interrupt exceptions and traps transfer control to the interrupt service routine generally through the in te rrup 1 ve c to r execute the associated interrupt service routine return control to the interrupted program EECS 678 Operating System Fundamentals Spring 2009 g Operating System Structure Hide the complexity and limitations of hardware hardware interface and create a simpler more powerful abstraction OS interface 39 Multiprogram ming needed for efficiency single user cannot keep CPU and HG devices busy at all times multiprogramming organizes jobs code and data so CPU always has one to execute subset of total jobs in system is kept in memory one job selected and run via job 5 che duling when it has to wait for lO for example 08 switches to another job EECS 678 Operating System Fundamentals Spring 2009 8 3 Operating System Structure cont 39 Time sharing multitasking logical extension of multiprogramming CPU switches jobs so frequently that users can interact with each job while it is running very fast response time each user has at least one program executing in memory 39 p r0 c e s s If several jobs ready to run at the same time CPU scheduling If processes don t fit in memory 5 wapping moves them in and out to run Virtual m e In my allows execution of processes not completely in memory EECS 678 Operating System Fundamentals Spring 2009 9 5 Operating System Operations Process coordination and security Process management Memory management Storage management Other issues in protection and security EECS 678 Operating System Fundamentals Spring 2009 10 5 Process Coordination amp Security Applications should not crash into oneanother addres 5 space all memory addresses that an application can touch address space of one process is separated from address space of another process and from the 08 Applications should not crash the OS dual m ode operation us 6 r mode and ke rne mode distinguish when system is running in user or system mode privilege d instructions only operate in kernel mode system calls returns change mode EECS 678 Operating System Fundamentals Spring 2009 11 5 Transition from User to Kernel Mode Timer to prevent infinite loop process hogging FGSOUFCGS set interrupt after specific period operating system decrements counter when counter zero generate an interrupt set up before scheduling process to regain control or terminate program that exceeds allotted time user process user mode user Process exeCUling gt calls System call return from system call mede b39t 1 f I I k I Trap return eme mode bil 0 mode bit 1 kernel mode mode bit 0 execute system call EELD 0 RS Uperaung bystem runaamentars bp g AUUB 12 g Process Management Process is a program in execution is a unit of work within the system program iS a passive e ntity process an active 6 ntity needs resources to accomplish its task termination requires reclaim of any reusable resources Singlethreaded process has one program counter specifying location of next instruction to execute execute instructions sequentially until completion Multithreaded process has one program counter per thread EECS 678 Operating System Fundamentals Spring 2009 13 5 Process Management Activities The operating system is responsible for the following activities in connection with process management process scheduling suspending and resuming processes providing mechanisms for process synchronization providing mechanisms for process communication providing mechanisms for deadlock handling EECS 678 Operating System Fundamentals Spring 2009 Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is in memory when optimizing CPU utilization and computer response to users Memory management activities keeping track of which parts of memory are currently being used and by whom deciding which processes or parts thereof and data to move into and out of memory allocating and deallocating memory space as needed EECS 678 Operating System Fundamentals Spring 2009 15 5 Storage Management 08 provides uniform logical view of info storage abstracts physical properties to logical storage unit file medium controlled by device ie disk drive tape drive varying properties include access speed capacity data transfer rate access method sequential or random FileSystem management Files usually organized into directories Access control is provided to determine who can access what 08 activities include Creating and deleting files and directories Primitives to manipulate files and dirs Mapping files onto secondary storage Backup files onto stable nonvolatile storage media EECS 678 Operating System Fundamentals Spring 2009 16 15 Performance of various levels of storage depends on distance from the CPU size and process technology used Storage Hierarchy Movement between levels of storage hierarchy can be explicit or implicit Level 1 2 3 4 Name registers cache main memory disk storage Typical size lt1 KB gt16 MB gt16 GB gt100 GB Implementation custom memory with on chip or oftchip CMOS DRAM magnetic disk technology multiple ports CMOS CMOS SRAM Access time ns 025 05 015 25 80 250 5000000 Bandwidth MBsec 20000 e 100000 5000 e 10000 1000 e 5000 20 150 Managed by compiler hardware operating system operating system Backed by cache main memory disk CD or tape EECS 678 Operating System Fundamentals Spring 2009 17 9 IO Subsystem One purpose of OS is to hide peculiarities of hardware devices from the user lO subsystem responsible for Memory management of lO including buffering storing data temporarily while it is being transferred caching storing parts of data in faster storage for performance spooling the overlapping of output of one job with input of otherjobs General devicedriver interface Drivers for specific hardware devices EECS 678 Operating System Fundamentals Spring 2009 18 9 Protection and Security Protection mechanism for controlling access of processes or users to resources defined by the 08 Security defense of the system against internal and external attacks denialof service worms vuuses identity theft theft of service EECS 678 Operating System Fundamentals Spring 2009 19 E Protection and Security 2 Systems generally first distinguish among users to determine who can do what user identities user IDs security IDs include name and associated number one per user user ID then associated with all files processes of that user to determine access control group identifier group ID allows set of users to be defined and controls managed then also associated with each process file privilege escalation allows user to change to effective ID with more rights EECS 678 Operating System Fundamentals Spring 2009 20 if Summary Operating System 08 is the software layer between the hardware and user programs 08 is the ultimate API 08 is the first program that runs when the computer boots up 08 is the program that is always running 08 is the resource manager 08 is the creator of the virtual machine EECS 678 Operating System Fundamentals Spring 2009 21 E Summary Operating System 2 Reality Abstraction A single CPU Multiple CPUs Limited RAM capacity Infinite capacity Mechanical disk File system networks Insecure and unreliable Reliable and secure Many physical machines A single machine EECS 678 Operating System Fundamentals Spring 2009 22 5 Who needs OS 08 makes a computer easier to use All general purpose computers need 08 A better question Who does not need 08 Some very specialized systems that usually do one thing 08 can be embedded in the application Microwave oven control MP3 players etc EECS 678 Operating System Fundamentals Spring 2009 23 g History of Operating Systems Phase I Hardware Expensive Humans Cheap Hardware mainframes 08 human operators Handle onejob a unit of processing at a time Computer time wasted while operators walk around the machine room EECS 678 Operating System Fundamentals r Spnng 2009 24 t OS Design Goal Efficient use of the hardware Batch system collects a batch of jobs before processing them and printing out results Job collection job processing and printing out results can occur concurrently Multiprogramming multiple programs can run concurrently Example Obound jobs and CPUbound jobs EECS 678 Operating System Fundamentals Spring 2009 25 9 History of Operating Systems Phase 11 Hardware Cheap Humans Expensive Hardware terminals 08 design goal more efficient use of human resources Timesharing systems each user can afford to own terminals to interact with machines EECS 678 Operating System Fundamentals 7 Spring 2009 26 9 History of Operating Systems Phase 111 Hardware very cheap humans very expensive Hardware personal computers 08 design goal allowing a user to perform many tasks at the same time Multitasking the ability to run multiple programs on the same machine at the same time Multiprocessing the ability to use multiple processors on the same machine EECS 678 Operating System Fundamentals 7 Spring 2009 27 5 History of Operating Systems Phase IV Distributed Systems physically separate heterogeneous networked computers Hardware computers with networks 08 design goal ease of resource sharing among machines Virtualization 08 itself runs under the control of an hypervis or VM have own memory management file system etc VM is key feature of some operating systems Windows server 2008 HP Integrity VM hypervisor no longer optional POWER5 and POWER6 from IBM EECS 678 Operating System Fundamentals Spring 2009 28
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'