Ch1 Annotated

Embed Size (px)

Citation preview

  • 7/30/2019 Ch1 Annotated

    1/27

    1.1

    Introduction

    What is an Operating System?

    Mainframe Systems

    Desktop Systems

    Multiprocessor Systems

    Distributed Systems

    Clustered System

    Real -Time Systems

    Handheld Systems

    Computing Environments

  • 7/30/2019 Ch1 Annotated

    2/27

    1.2

    What is an Operating System?

    A program that acts as an intermediary between a user of acomputer 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.

  • 7/30/2019 Ch1 Annotated

    3/27

    1.3

    Computer System Components

    1. Hardware provides basic computing resources (CPU,memory, I/O devices).

    2. Operating system controls and coordinates the use of

    the hardware among the various application programs forthe various users.

    3. Applications programs define the ways in which thesystem resources are used to solve the computingproblems of the users (compilers, database systems,

    video games, business programs).4. Users (people, machines, other computers).

  • 7/30/2019 Ch1 Annotated

    4/27

    1.4

    Operating Systems Views

    Fundamental goal of computer system is to execute userprograms & make problem solving easier. maybe goal

    should be extended for modern systems: communication,access remote data,

    In general, no completely adequate definition of OS adynamic evolving entity

    Three basic components of an OS- Process control/management- Memory management

    - I/O and files system control

    System/administrator vs. user view sometimes in conflict-efficiency vs. ease of use

  • 7/30/2019 Ch1 Annotated

    5/27

    1.5

    Abstract View of System Components

  • 7/30/2019 Ch1 Annotated

    6/27

    1.6

    Operating System Definitions

    Resource allocator manages and allocates resources

    deals (hopefully!) with deadlock.

    Control program controls the execution of user

    programs and operations of I/O devices .

    Kernel the one program running at all times (all elsebeing application programs).

  • 7/30/2019 Ch1 Annotated

    7/271.7

    Memory Layout for a Simple Batch System

  • 7/30/2019 Ch1 Annotated

    8/271.8

    Multiprogrammed Batch Systems

    Several jobs are kept in main memory at the same time, and theCPU is multiplexed among them.

  • 7/30/2019 Ch1 Annotated

    9/271.9

    OS Features Needed for Multiprogramming

    I/O servicesprovided by the system.

    I/O done in kernel mode via device drivers

    May run concurrently with application - if applicationmust wait for I/O, then OS will allow another job to run -

    maximize CPU and I/O utilization - lots on this later.

    Memory management the system must allocate thememory to several jobs.

    CPU scheduling and dispatching the system mustchoose among several jobs ready to run - must minimizecontext switching time - a performance bottleneck.

    Allocation of devices - to resident jobs - danger ofdeadlock.

  • 7/30/2019 Ch1 Annotated

    10/271.10

    Time-Sharing SystemsInteractive Computing

    The CPU is time multiplexed among several jobs that are keptin memory and on disk (the CPU is allocated to a job only if the

    job is in memory). A job could now be a user ==> many users on a single

    machine

    A job swapped in and out of memory to the disk - to free upmemory for a higher priority job, or if it has a long wait forI/O to complete - more on this later.

    Comment: A program in some state of execution (having

    been already loaded in memory, but not completed) isknown as a process.

    On-line communication between the user and the system isprovided; when the operating system finishes the execution of

    one command, it seeks the next control statement from theusers keyboard.

    On-line system must be available for users to access data andcode - presents an interactive userinterface- not justbatch.

  • 7/30/2019 Ch1 Annotated

    11/271.11

    Desktop Systems

    Personal computers computer system dedicated to asingle user.

    I/O devices keyboards, mice, display screens, smallprinters.

    User convenience and responsiveness.

    Can adopt technology developed for larger operatingsystem often individuals have sole use of computer anddo not need advanced CPU utilization of protectionfeatures.

    May run several different types of operating systems(Windows, MacOS, UNIX, Linux)

    Forerunner of the RISC Workstation: ex: SUN or IBMRISC/6000 work stations - the PC would revolutionizecomputing - some companies (guess who!) wereblind to this - others (SUN) had the foresight torecognize this.

  • 7/30/2019 Ch1 Annotated

    12/271.12

    Parallel (Tigh t ly Coupled) Systems

    Multiprocessor systems with more than on CPU in closecommunication.

    Tight ly coupled sy stem processors share memoryand a clock; communication usually takes place throughthe shared memory via a bus - .

    Advantages of parallel (Tight ly Coupled) systems:

    Increased throughput

    Increased computing power (speed-up factor)

    Economical

    Increased reliability

    graceful degradation

    fail-soft systems

    OS functions for multiprocessor systems aresignificantly more complex

  • 7/30/2019 Ch1 Annotated

    13/271.13

    Parallel (Tigh t ly Coupled) Systems(Cont.)

    Shared m emory t ight ly cou pled schemes: SMP and

    Asymmetr ic

    Symmetric multiprocessing (SMP) The common kernel in shared memory could operate on any

    processor process/thread parallism on kernel executionpossible processors are peers no master/slave.

    Many processes can run at once without performance deterioration -

    true parallelism vs pseudo parallelism of a multitasking systemon a uniprocessor.

    Most modern operating systems support SMP

    Asymmetric multiprocessing Each processor is assigned a specific task; master processor

    schedules and allocated work to slave processors.

    More common in extremely large systems--------------------------------Problem with parallelism: how do you distribute a problemacross multiple processes to capture the max potential of thesystem? Can all algorithms be parallelized? Are theretheoretical limits to parallelizing? - see also loosely coupled.

    Example logic simulators - a natural for parallelism.

  • 7/30/2019 Ch1 Annotated

    14/271.14

    Flynns Classification

    SISD Single Instruction, Single data stream Basic Uniprocessor single program counter

    SIMD - Single Instruction, Multiple data stream A logically single stream of instructions operating on different units of data in

    parallel ex. A vector processor

    Example of an implementation: a single stream of SIMD instructions from asingle program counter in a special SISD host processor are broadcastedtomany parallel SIMD processors each with its own registers and cache memory.

    Each of the SIMD processors now executes the same instruction on a differentunit of data in parallel lock step synchronism. Example: the CM-2 SuperComputer with 65,563 processors, each having a 1 bit ALU (32 way bitslicing?)

    MISD - Multiple Instruction, Single data stream sequence of different databroadcasted to different parallel processors, each executing a different

    instruction sequence. Not ever implemented.

    MIMD - Multiple Instruction, Multiple data stream many parallel processorsexecuting different instruction streams on different data items. Commonly implemented with loosely couples clusters of general purpose

    computers on a network(see later) and also tightly coupled SMP.

    P ll l ( ) S

  • 7/30/2019 Ch1 Annotated

    15/27

    1.15

    Parallel (Tigh t ly Coupled) Systems(Cont.)

    From Stallings, Operating Systems, 4th ed.

  • 7/30/2019 Ch1 Annotated

    16/27

    1.16

    Symmetric Multiprocessing Architecture

    S

  • 7/30/2019 Ch1 Annotated

    17/27

    1.17

    Distributed Systems(Loosely Coupled)

    Distribute the computation among several physical processors.

    Loosely coupled system(clusters?) each processor has its ownlocal memory; processors communicate with one another throughvarious communications lines, such as high-speed buses , cross-bar switches, LANS, or telephone lines.

    Could be a heterogeneous mixture of independent computershaving different characteristics etc. all connected on by somenetwork fabric.

    Advantages of distributed systems.

    Resources Sharing

    Computation speed up load sharing

    Reliability

    Communications

    Disadvantages: control and OS functions complicated, anddistributing an algorithm over the nodes is difficult.

  • 7/30/2019 Ch1 Annotated

    18/27

    1.18

    Distributed Systems (cont)

    Requires networking infrastructure. Local area networks (LAN) or Wide area networks (WAN)

    May be either client-server or peer-to-peer systems.

    Clients generate requests to be satisfied by the serverserver performs computation with results sent to client

    Peer-to-peer example: Internet or a master and manyslaves on a network or switch.

  • 7/30/2019 Ch1 Annotated

    19/27

    1.19

    General Structure of Client-Server

  • 7/30/2019 Ch1 Annotated

    20/27

    1.20

    Clustered Systems

    Alternative to SMP

    Goal is high reliability,availability, and performance. A group of interconnected, whole computers

    working together as a unified computing resourcethat can create the illusion of being a single machine.

    Clustering allows two or more systems to share

    (secondary?) storage example RAID disks. Asymmetric clustering: multiple servers runs the

    application while one server stands by - monitor.

    Symmetric clustering: all N hosts are running theapplication mutual monitoring- no single monitor

    Reference: Stallings, 4th ed., section 13.4

  • 7/30/2019 Ch1 Annotated

    21/27

    1.21

    Real Time System

    A system is said to be Real Time if it is required tocomplete its work & deliver its services on time.

    Example Flight Control System

    All tasks in that system must executeon time.

  • 7/30/2019 Ch1 Annotated

    22/27

    1.22

    Hard and Soft Real Time Systems

    Hard Real Time SystemFailure to meet deadlines is fatal

    example : Flight Control System

    medical imaging systems,industrial control systems

    Soft Real Time SystemLate completion of jobs is undesirable but

    not fatal.System performance degrades as more &

    more jobs miss deadlines

    Online Databases

  • 7/30/2019 Ch1 Annotated

    23/27

    1.23

    Real-Time Systems

    Often used as a control device in a dedicated application

    such as controlling scientific experiments, medicalimaging systems, industrial control systems, and somedisplay systems.

    Well-defined fixed-time constraints.

    Real-Time systems may be either hardor softreal-time.

  • 7/30/2019 Ch1 Annotated

    24/27

    1.24

    Real-Time Systems (Cont.)

    Hard real-time:

    Secondary storage limited or absent, data stored in short termmemory, or read-only memory (ROM)

    Conflicts with time-sharing systems, (delays unpredictable),thus not supported by general-purpose operating systems.

    Uses deadline scheduling of tasks#1 thing you don't want to happen: system shows thehour glass icon at 1000 meters over the moon when

    landing!

    Soft real-time

    Limited utility in industrial control of robotics Useful in applications (multimedia, virtual reality) requiring

    advanced operating-system features.

    Cannot guarantee deadlines, but can guarantee highestpriority for Soft RT tasks over ordinary tasks.

  • 7/30/2019 Ch1 Annotated

    25/27

    1.25

    Handheld Systems

    Personal Digital Assistants (PDAs)

    Cellular telephones

    Issues:

    Limited memory

    Slow processors

    Small display screens.

  • 7/30/2019 Ch1 Annotated

    26/27

    1.26

    Migration of Operating-System Concepts and Features

    What does this mean?

  • 7/30/2019 Ch1 Annotated

    27/27

    1 27

    Computing Environments

    Traditional computing

    Advancing technologies and falling prices rapidly rechanging what used to be traditional computing. Notonly are enterprise level functions being pushed down tothe PC level, but new functions are being directlyimplemented in the PC/micro-computers

    Web-Based ComputingApplications reside on Web servers, rather than on end-users' workstations. These workstations, or appliances areconnected to secure servers in order to use applicationsvia web browsers.

    Embedded ComputingMost prevalent form of computers in existence: Inautomobiles, VCRs, microwave ovens, They do specific tasks, and associated systems areprimitive.