Presentation on theme: "What is an Operating System?"— Presentation transcript:
1What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware.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.
2Computer System Structure Computer system can be divided into four componentsHardware – provides basic computing resourcesCPU, memory, I/O devicesOperating systemControls and coordinates use of hardware among various applications and usersApplication programs – define the ways in which the system resources are used to solve the computing problems of the usersWord processors, compilers, web browsers, database systems, video gamesUsersPeople, machines, other computers
4Operating System Definition OS is a resource allocatorManages all resourcesDecides between conflicting requests for efficient and fair resource useOS is a control programControls execution of programs to prevent errors and improper use of the computer
5Operating System Definition (Cont.) “The one program running at all times on the computer” is the kernel. Everything else is either a system program (ships with the operating system) or an application program
6Computer Startup bootstrap program is loaded at power-up or reboot Typically stored in ROM or EPROM, generally known as firmwareInitializes all aspects of systemLoads operating system kernel and starts execution
7Computer System Organization Computer-system operationOne or more CPUs, device controllers connect through common bus providing access to shared memoryConcurrent execution of CPUs and devices competing for memory cycles
8Computer-System Operation 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 buffersI/O is from the device to local buffer of controller.Device controller informs CPU that it has finished its operation by causing an interrupt.
9Common Functions of Interrupts Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines.Interrupt architecture must save the address of the interrupted instruction.Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt.A trap is a software-generated interrupt caused either by an error or a user request.An operating system is interrupt driven.
10Interrupt HandlingThe operating system preserves the state of the CPU by storing registers and the program counter.Determines which type of interrupt has occurred:pollingvectored interrupt systemSeparate segments of code determine what action should be taken for each type of interrupt
12I/O StructureAfter I/O starts, control returns to user program only upon I/O completion.Wait instruction idles the CPU until the next interruptWait 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.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 device indicating its type, address, and state.Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt.
15Direct Memory Access Structure Used for high-speed I/O devices able to transmit information at close to memory speeds.Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention.Only one interrupt is generated per block, rather than the one interrupt per byte.
16Storage StructureMain memory – only large storage media that the CPU can access directly.Secondary storage – extension of main memory that provides large nonvolatile storage capacity.Magnetic disks – rigid metal or glass platters covered with magnetic recording materialDisk surface is logically divided into tracks, which are subdivided into sectors.The disk controller determines the logical interaction between the device and the computer.
17Storage Hierarchy Storage systems organized in hierarchy. Speed Cost VolatilityCaching – copying information into faster storage system; main memory can be viewed as a last cache for secondary storage.
19CachingImportant principle, performed at many levels in a computer (in hardware, operating system, software)Information in use copied from slower to faster storage temporarilyFaster storage (cache) checked first to determine if information is thereIf it is, information used directly from the cache (fast)If not, data copied to cache and used thereCache smaller than storage being cachedCache management important design problemCache size and replacement policy
20Performance of Various Levels of Storage Movement between levels of storage hierarchy can be explicit or implicit
21Migration of Integer A from Disk to Register Multitasking environments must be careful to use most recent value, no matter where it is stored in the storage hierarchyMultiprocessor environment must provide cache coherency in hardware such that all CPUs have the most recent value in their cacheDistributed environment situation even more complexSeveral copies of a datum can existVarious solutions are available
22Types of Systems with its OS Support Mainframe systems:- to tackle many commercial and scientific applicationsa) Batch systems:common i/p devices: card readers and tape drivescommon o/p devices: line printers, tape drives and card punches- user did not directly interact with the computer system- user prepared a job and submitted to computer operator- Job consists of 1)program 2) data 3) some control information (about the nature of the job)- job usually in the form of punch cards- output is appeared after some time (mins, hours or days)- output consists of result of the program as well as a dump of the final main memory and register contents for debugging
23OS in batch systems: To speed up processing – fairly simple – main task was to transfer control automatically from one job to the next– always resident in memoryTo speed up processing– operators batched together jobs with similar needs and ran them through the computer as group (Programmers would leave their programs with the operator)– operators sort programs into batches with similar requirements and run each job– output from each job would be sent to back to the appropriate programmer
24Memory layout of simple batch system Operating SystemUser Program area
25CPU is often idle, because the speeds of the mechanical i/o devices are slower than those of electronic devicesslow CPU – 1000 instruction / secfast card reader cards / secdifference in speed between CPU and i/o devices – three orders of magnitude or moreintroduction of disks – results in faster i/o devices, CPU speed is also increased - so the problem is not resolvedIntroduction of disk technology allowed OS to keep all jobs in diskOS perform job scheduling – to use resources and perform tasks efficiently
26In multiprogramming system, b) Multiprogrammed Systems:needed for efficiencySingle user cannot keep CPU and I/O devices busy at all timesMultiprogramming increases CPU utilization by organizing jobs so that the CPU always has one to executeIn multiprogramming system,a subset of total jobs (job pool) in system is kept in memoryOS picks one and begins to execute.When that job needs to wait (to complete i/o), the CPU is switched to another job and so on.When first job finishes waiting , it gets the CPU backMultiprogrammed OS must make decision for usersJob pool – consists of all processes residing on disk waiting for allocation in main memoryJob scheduling – selection of jobs from job pool to main memoryCPU Scheduling – Selection of program from main memory for execution
27Memory layout of Multiprogramming system Operating SystemJob 1Job 2Job 3
28c) Timesharing Systems – multitasking is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computingResponse time should be < 1 secondEach user has at least one program executing in memory processIf several jobs ready to run at the same time CPU schedulingIf processes don’t fit in memory, swapping moves them in and out to runVirtual memory allows execution of processes not completely in memorymust also provide a file system – resides on a collection of disks – disk management must be providedAlso provide mechanism for concurrent execution
293. Multiprocessor systems 2. Desktop Systems- personal computers- PC OS – neither multiuser nor multitaskinggoals of these OS – instead of maximizing CPU and peripheral utilization , systems opt for maximizing user convenience and responsivenessMicrosoft windows and apple MacintoshFile protection is necessary3. Multiprocessor systems- also known as parallel systems or tightly coupled systems- more than one processor in close communication, sharing the computer bus, the clock, memory and peripheral devices
30Advantages: Increased throughput - more processors, more work done in less time- speedup ratio with N-processors is not N, it is less than N- when multiple processors cooperate on a task – overhead is incurred in keeping all the parts working correctlyEconomy of Scale- can save more money than multiple single-processor systems, because they can share peripherals, mass storage and power supplies- all the processors can share the data if several programs operate on same dataIncreased reliability- failure of one processor will not halt the system, only slow it down- this ability to continue providing service proportional to the level of surviving hardware is called graceful degradation- systems designed for graceful degradation are also called fault tolerant
31Most common multiple-processor systems – Symmetric multiprocessing (SMP) - each processor runs an identical copy of OS concurrently and these copies communicate with one another as needed- all processors are peers, no master-slave relationship- carefully control i/o to ensure that the data reach the appropriate processor- since CPUs are separate, one may be sitting idle while another is overloaded, resulting inefficiencies. This can be avoided if processors share certain data structuresBenefit – N processes can run simultaneously if there are N CPUs without causing the significant deterioration of performance
32Asymmetric Multiprocessing - each processor is assigned a specific task - master processor – controls the system, others either look to the master for instruction of have predefined task- Master processor schedules and allocate3s work to the slave processors master – slave relationship
334. Distributed Systems:- network – communication path between two or more systems- depend on networking for their functionality- able to share computational tasks- networks vary by protocols, distance between nodes and transport mediaProtocols:Most common protocol – TCP/IP – supported by most OS (Windows and UNIX OS)Other protocols – ATMTo an OS – network protocol simply needs an interface device – network adapterDistance between nodes:LAN – exists with in a floor or a buildingMAN – link between buildings with in acityWAN – exists between buildings, cities or countries
34Client-Server Systems Bluetooth devices communicate over a short distance of several feet, creating small area networkTransport Media:- copper wires, fiber strands, wireless transmission between satellites, microwave dishes, and radios- cellular phones create a network – short-range infrared communication can be used for networkingClient-Server Systems- Centralized system acts as server systems to satisfy requests generated by client machinesClientClientClientnetworkServer
35b) Peer-to-Peer Systems: Server systems – categorized as compute server and file serverCompute – server systems – provide an interface to which clients can send requests to perform an action, in response to which they execute the action and send back results to the clientFile-server systems – provide a file-system interface where clients can create, update, read and delete files.b) Peer-to-Peer Systems:- loosely-couples system or distributed system- collection processors that do not share memory or a clock- each processor has its own local memory- processors communicate with one another through various communication lines, such as high-speed buses or telephone lines
36- internet and WWW – influence on the recent development of OS - , ftp- modern PCs and work stations are capable of running a web browser for accessing hypertext documents on the webNetwork Operating System- provides features such as file sharing across the network and that includes a communication scheme allows different processes on different computers to exchange messages- acts autonomously from all other computers on the networkDistributed Operating System- less autonomous environment- different Oss communicate closely enough to provide the illusion that only single OS controls the network
376. Clustered Systems- gather together multiple CPUs to accomplish computational work like parallel systems- differ from parallel systems in that they are composed of two or more individual systems coupled together- share storage and are closely linked via LAN networking- to provide high availability- a layer of cluster s/w runs on cluster nodes, each node can monitor one or more of others- if monitored machine fails, the monitoring machine can take ownership of its storage and restart the applications that were running on the failed machine- users and clients of the application would only see brief interruption of the service
38Asymmetric clustering: - one machine is hot stand y mode while other is running the applications- hot stand y host – only monitor the active server, if server fails, the hot standby host becomes the active serverSymmetric clustering- two or more hosts are running applications, and they are monitoring each otherOther forms of clustersParallel cluster - allow multiple hosts to access the same data on the shared storageEg. Oracle parallel server – version of Oracle’s database that has been designed to run on parallel clustersGlobal cluster – machines could be anywhere in the worldSAN – Storage Area Network – allow each attachment of multiple hosts to multiple storage unitsCurrent clusters – limited to 2 or 4 hosts due to the complexity of connecting the hosts to shared storage
397. Real-Time Systems - well-define fixed time constraints - used when rigid time requirements have been placed on the operation of a processor of the flow of data- well-define fixed time constraints- functions correctly only if returns the correct result within its time constraints- often used as control devoice in a dedicated application- sensors bring data to computer , computer analyzes the data and possible adjust controls to modify the sensor inputsEg. Medical imaging systems, industrial control systems and certain display systems, automobile fuel-injection system, home-appliance controllers
408. Hand-held Systems Hard real-time system Soft real-time system - guarantees that critical tasks be completed on time-Soft real-time system- less-restrictive type of real-time system- critical real-time task gets priority over other tasks and retains that priority until it completes8. Hand-held Systems- include personal digital assistants (PDAs) such as palm-pilots or cellular phones with connectivity to a network such as the Internet- size and weigh is less less memory space, slow processors, small display screens- 512kb and 8 MB of memory
41Operating-System Operations Interrupt driven by hardwareSoftware error or request creates exception or trapDivision by zero, request for operating system serviceOther process problems include infinite loop, processes modifying each other or the operating systemDual-mode operation allows OS to protect itself and other system componentsUser mode and kernel modeMode bit provided by hardwareProvides ability to distinguish when system is running user code or kernel codeSome instructions designated as privileged, only executable in kernel modeSystem call changes mode to kernel, return from call resets it to user
42Transition from User to Kernel Mode Timer to prevent infinite loop / process hogging resourcesSet interrupt after specific periodOperating system decrements counterWhen counter zero generate an interruptSet up before scheduling process to regain control or terminate program that exceeds allotted time
441. Process ManagementA process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity.Process needs resources to accomplish its taskCPU, memory, I/O, filesInitialization dataResources are given to process when its created or allocated while it is executingProcess termination requires reclaim of any reusable resourcesSingle-threaded process has one program counter specifying location of next instruction to executeProcess executes instructions sequentially, one at a time, until completionMulti-threaded process has one program counter per threadTypically system has many processes, some user, some operating system running concurrently on one or more CPUsConcurrency by multiplexing the CPUs among the processes / threads
45Process Management Activities The operating system is responsible for the following activities in connection with process management:Creating and deleting both user and system processesSuspending and resuming processesProviding mechanisms for process synchronizationProviding mechanisms for process communicationProviding mechanisms for deadlock handling
462. Main Memory Management Large array of words or bytesRepository of quickly accessible data shared by I/o devicesAll data in memory before and after processingAll instructions must be in main memory in order to executeFor the CPU to process data from disk, data must first transfer to main memory by CPU-generated I/O callsFor a program to be executed, it must be mapped to absolute address & loaded into memoryWhen program terminates, memory space is declared available & next program can be loaded and executed
47Memory management determines what is in memory when Optimizing CPU utilization and computer response to usersOS is responsible for following activities in connection with Memory managementKeeping track of which parts of memory are currently being used and by whomDeciding which processes (or parts thereof) and data to move into and out of memoryAllocating and deallocating memory space as needed
483. File ManagementMagnetic tape, disk and optical disk – used to store informationEach storage media has own characteristics and physical organization.OS provides uniform, logical view of information storageAbstracts physical properties to logical storage unit - fileEach 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)OS maps files in to physical media & accesses these files via the storage devicesFile collection of related information defined by its creator represents programs and data data files , text files
49File-System management Files usually organized into directoriesAccess control on most systems to determine who can access whatOS activities includeCreating and deleting files and directoriesPrimitives to manipulate files and directoriesMapping files onto secondary storageBackup files onto stable (non-volatile) storage media
504. Mass-Storage or Secondary Storage Management Usually disks used to store data that does not fit in main memory or data that must be kept for a “long” period of time.To back up main memoryProper management is of central importanceEntire speed of computer operation hinges on disk subsystem and its algorithmsOS is responsible for following activities in connection with disk managementFree-space managementStorage allocationDisk schedulingSome storage need not be fastTertiary storage includes optical storage, magnetic tapeStill must be managedVaries between WORM (write-once, read-many-times) and RW (read-write)
515. I/O System ManagementOne purpose of OS is to hide peculiarities of hardware devices from the userIn UNIX, peculiarities of I/O devices are hidden from the bulk of OS itself by the IO subsystemI/O subsystem responsible forMemory management of I/O 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 other jobs)General device-driver interfaceDrivers for specific hardware devicesOnly device driver knows the peculiarities of the specific device to which it is assigned
526. Protection and Security Protection – any mechanism for controlling access of processes or users to resources defined by the OSSecurity – defense of the system against internal and external attacksHuge range, including denial-of-service, worms, viruses, identity theft, theft of serviceSystems generally first distinguish among users, to determine who can do whatUser identities (user IDs, security IDs) include name and associated number, one per userUser ID then associated with all files, processes of that user to determine access controlGroup identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, filePrivilege escalation allows user to change to effective ID with more rights
537. NetworkingDistributed systems – collection of processors that do not share memory, peripheral devices or a clockNodes communicates with one another by communication lines such as high speed buses or networksNeed to consider message routing, connection strategies and problems of connection security
548. Command Interpreter System Interface between user and OSResides In kernel of some OSBut in MS-DOS and UNIX – Command Interpreter is a special program that is running when a job is initiated or when a user first logs in.Program – reads and interpretsControl card interpreter or command-line interpreter or shell to get next command statement and execute itUser friendly interface is mouse-based window and menu system eg. MS Windows and MacintoshMS-DOS and UNIX shells operate as command-line interpreter
55Operating System Services For convenience of the programmer to make the programming task easier:User interface - Almost all operating systems have a user interface (UI)Varies between Command-Line (CLI), Graphics User Interface (GUI), BatchProgram execution - The system must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error)I/O operations - A running program may require I/O, which may involve a file or an I/O device.File-system manipulation - The file system is of particular interest. Obviously, programs need to read and write files and directories, create and delete them, search them, list file Information, permission management.
56Communications – Processes may exchange information, on the same computer or between computers over a networkCommunications may be via shared memory or through message passing (packets moved by the OS)Error detection – OS needs to be constantly aware of possible errorsMay occur in the CPU and memory hardware, in I/O devices, in user programFor each type of error, OS should take the appropriate action to ensure correct and consistent computingDebugging facilities can greatly enhance the user’s and programmer’s abilities to efficiently use the system
57Resource allocation - When multiple users or multiple jobs running concurrently, resources must be allocated to each of themMany types of resources - Some (such as CPU cycles, main memory, and file storage) may have special allocation code, others (such as I/O devices) may have general request and release code.Accounting - To keep track of which users use how much and what kinds of computer resourcesProtection and security - The owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each otherProtection involves ensuring that all access to system resources is controlledSecurity of the system from outsiders requires user authentication, extends to defending external I/O devices from invalid access attemptsIf a system is to be protected and secure, precautions must be instituted throughout it. A chain is only as strong as its weakest link.
58System Calls Provide the interface between process and OS Programming interface to the services provided by the OSTypically written in a high-level language (C or C++)May generate a call to a special run-time routine that makes system call or system call may be generated directly in-line.Mostly accessed by programs via a high-level Application Program Interface (API) rather than direct system call useThree most common APIs are:Win32 API for Windows,POSIX API for POSIX-based systems (including virtually all versions of UNIX, Linux, and Mac OS X), andJava API for the Java virtual machine (JVM)
59Example of System Calls System call sequence to copy the contents of one file to another file
60System Call Implementation Typically, a number associated with each system callSystem-call interface maintains a table indexed according to these numbersThe system call interface invokes intended system call in OS kernel and returns status of the system call and any return valuesThe caller need know nothing about how the system call is implementedJust needs to obey API and understand what OS will do as a result callMost details of OS interface hidden from programmer by APIManaged by run-time support library (set of functions built into libraries included with compiler)
62Standard C Library Example C program invoking printf() library call, which calls write() system call
63System Call Parameter Passing Often, more information is required than simply identity of desired system callExact type and amount of information vary according to OS and callThree general methods used to pass parameters to the OSSimplest: pass the parameters in registersIn some cases, may be more parameters than registersParameters stored in a block, or table, in memory, and address of block passed as a parameter in a register (refer following figure)This approach taken by Linux and SolarisVery commonly used approach for parameter passing.Parameters placed, or pushed, onto the stack by the program and popped off the stack by the operating systemBlock and stack methods do not limit the number or length of parameters being passed which is good, but a bit slower than register access.
65Types of System Calls Process control end, abort Load, execute Create process, terminate processGet process attributes, set process attributesWait for timeWait event, signal eventAllocate and free memory
66Programs either terminate normally or abnormally. In either event, a system call(s) is/are invoked and appropriate actions / messages are taken.Regardless, the operating system must transfer control back to the command interpreter who initiated the process so that the user is informed of the result of the request.Let’s assume a process aborts (say, division by zero is attempted)A dump may be taken (automatically or not) and a message produced.A debugger may examine the dump to determine the cause of the problem; control must be returned to the interface.Command Interpreter ‘continues’ to interpret commands.In a GUI, a message window may appear asking the user what to do with the dump data or other action to be taken..In a batch system, the job will normally be terminated and the command interpreter will merely continue with the next job.
67MS DOS is considered a single-tasking system; MSDOS has a command interpreter invoked when computer is started.Because it is a single-tasking system, the command interpreter uses a simple method to run a program and does NOT create a new process.The command interpreter simply loads a program into memory, writes over itself (covering unneeded code) to provide as much memory as possible.The command interpreter sets the instruction pointer to point to the first executable instruction in the code and control is then transferred to that code.The program continues and either an error causes a trap, or the program executes a system call to terminate.Error code is saved in memory later use.Control transfers back to command interpreter, which reloads the rest of itself from disk, and command interpreter makes the error code available to the user.
68MS-DOS execution Process loaded into memory covering part of command interpreter.Critical code isnot covered.(a) At system startup (b) running a program
70File managementcreate file, delete fileOpen, closeRead, write, repositionGet file attributes, set file attributesDevice managementRequest device, release deviceGet device attributes, set device attributesLogically attach or detach devicesIn UNIX and MS-DOS, file and device are merged into a combined file-device structure. I/O devices are identified by special file names.
71Information maintenance Get time or date, set time or dateGet system data, set system dataGet process, file or device attributesSet process, file or device attributesCommunicationsCreate, delete communication connectionSend, receive messagesTransfer status informationAttach or detach remote devices
72System ProgramsSystem programs provide a convenient environment for program development and execution. The can be divided into:File manipulationStatus informationFile modificationProgramming language supportProgram loading and executionCommunicationsApplication programsMost users’ view of the operation system is defined by system programs, not the actual system calls
73System ProgramsProvide a convenient environment for program development and executionSome of them are simply user interfaces to system calls; others are considerably more complexFile management - Create, delete, copy, rename, print, dump, list, and generally manipulate files and directoriesStatus informationSome ask the system for info - date, time, amount of available memory, disk space, number of usersOthers provide detailed performance, logging, and debugging informationTypically, these programs format and print the output to the terminal or other output devicesSome systems implement a registry - used to store and retrieve configuration information
74System Programs (cont’d) File modificationText editors to create and modify filesSpecial commands to search contents of files or perform transformations of the textProgramming-language support - Compilers, assemblers, debuggers and interpreters sometimes providedProgram loading and execution- Absolute loaders, relocatable loaders, linkage editors, and overlay-loaders, debugging systems for higher-level and machine languageCommunications - Provide the mechanism for creating virtual connections among processes, users, and computer systemsAllow users to send messages to one another’s screens, browse web pages, send electronic-mail messages, log in remotely, transfer files from one machine to another
75System Structure - the way the components are interconnected and melded into a kernel
761. Simple StructureSmall, simple and limited systems and then grew beyond their original scopeExample – MS-DOSMS-DOS – written to provide the most functionality in the least spaceNot divided into modulesAlthough MS-DOS has some structure, its interfaces and levels of functionality are not well separatedNo dual mode of operationNo hardware protectionLeave the basic hardwareApplication programs – access the basic IO routines to write directly such freedom leaves MS-DOS into vulnerable to errant program, causing entire system crashes when user program fails
78UNIXUNIX – limited by hardware functionality, the original UNIX operating system had limited structuring.The UNIX OS consists of two separable partsSystems programsThe kernelConsists of everything below the system-call interface and above the physical hardwareProvides the file system, CPU scheduling, memory management, and other operating-system functions;a large number of functions combined into one level; this makes UNIX difficult to enhance, as changes in one section could adversely affect other areas.
802. Layered Approach Method used for modularization of system The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface.An OS layer is an implementation of an abstract object that is the encapsulation of data and operations that can manipulate those dataAdvantage: ModularityWith modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers. A layer does not need to know how these operations are implemented; it needs to know only what these operations do.
82Simplifies debugging and system verification if an error is found during the debugging of a particular layer, the error must be on that layer, because the layers below it are already debuggedDifficulty – involves careful definition of the layersProblem – less efficienteg. When user program executes an I/O operation, it executes a system call that is trapped to I/O layer memory-mgt layer CPU-scheduling layer passed to hardwareAt each layer, the parameters may be modified, data may need to be passed and adds overhead to system callSystem call takes longer than does one on non-layered system
833. Microkernels Modularizing the kernel Moves as much from the kernel into “user” spaceRemoving all non-essential components from the kernel and implement them as system and user-level programs smaller kernelProvides minimal process and memory management in addition to communication facilityCommunication takes place between user modules using message passingBenefits:Easier to extend a microkernelNew services are added to user space; this will not require modification of kernelEasier to port the operating system to new architecturesMore reliable (less code is running in kernel mode)More secureDemerit:Performance overhead of user space to kernel space communication
85Modules Most modern operating systems implement kernel modules Uses object-oriented approachEach core component is separateEach talks to the others over known interfacesEach is loadable as needed within the kernelOverall, similar to layers but with more flexible
87Virtual MachinesA virtual machine takes the layered approach to its logical conclusion. It treats hardware and the operating system kernel as though they were all hardwareA virtual machine provides an interface identical to the underlying bare hardwareThe operating system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memory
88Virtual Machines (Cont.) The resources of the physical computer are shared to create the virtual machinesCPU scheduling can create the appearance that users have their own processorSpooling and a file system can provide virtual card readers and virtual line printersA normal user time-sharing terminal serves as the virtual machine operator’s console
90Virtual Machines (Cont.) The virtual-machine concept provides complete protection of system resources since each virtual machine is isolated from all other virtual machines. This isolation, however, permits no direct sharing of resources.A virtual-machine system is a perfect vehicle for operating-systems research and development. System development is done on the virtual machine, instead of on a physical machine and so does not disrupt normal system operation.The virtual machine concept is difficult to implement due to the effort required to provide an exact duplicate to the underlying machine