OS module 1-A

download OS module 1-A

of 75

Transcript of OS module 1-A

  • 8/3/2019 OS module 1-A

    1/75

    Introduction to

  • 8/3/2019 OS module 1-A

    2/75

    Objectives

    1.

    A firm understanding about OS, its primarypurpose and goals to a computer system;

    2. Trace the history of OS and the developmentof systems.

    3. Concepts basic to OS;

    4. OS components and its componentmanagement;

    5. Computer system operations, structure of thecomputer systems and hardware protection;

    6. Services of OS.

  • 8/3/2019 OS module 1-A

    3/75

    Introduction

    Major components of Computer Systems: Hardware

    Computer users

    Software

    Note: Without software, computer is of little use. However

    with software, computer can store, manipulate andretrieve information, and can engage in many otheractivities.

  • 8/3/2019 OS module 1-A

    4/75

    Introduction

    Software can be grouped into:

    System software (OS and utilities)

    Application software (user programs)

    User1 User2 User3 User n

    compiler assembler text editor databasesystems

    A p p l i c a t i o n P r o g r a m s

    OPERATING SYSTEMS

    Computer Hardware

  • 8/3/2019 OS module 1-A

    5/75

    Introduction

    Utilities ApplicationSoftware

    OS

    device device device

    CPU

    M e m o r y

  • 8/3/2019 OS module 1-A

    6/75

    Introduction

    Without an OS, a user who wanted to run aprogram that uses some of the resources ofthe system will need to write a program that

    includes code for driving the resourcesrequired. Code for handling keyboard,printers, etc. have to be written.

  • 8/3/2019 OS module 1-A

    7/75

    Introduction

    To alleviate these difficulties, OS contains setof procedures for driving the resources of thesystem, thus it frees the users from the dirty

    details of writing these drivers for the devicesinvolved in the problem being solved.

  • 8/3/2019 OS module 1-A

    8/75

    What is OS?

    Program implemented either in firmware orsoftware which acts as an intermediarybetween the user of a computer and the

    computer hardware.Collection of system programs (procedures)

    that together control the operation of a

    computer system. The purpose is to provide an environment

    wherein users can execute programs

  • 8/3/2019 OS module 1-A

    9/75

    Types of OS

    Desktop OS

    Typically installed on PC type of computer, usedby a singe user at a time, and may or may not be

    connected to a network.

    Server OS

    Installed in a more powerful computer connectedto a network enabling multiple users to accessinformation such as e-mails, files, and software

  • 8/3/2019 OS module 1-A

    10/75

    Network OS

    NOS

    Either desktop or server OS that enables acomputer to communicate with other computers

    through network cable (eg. CAT-5/6) or wirelesstransmissions (eg. wiFi / wiMAX) and coordinatesnetwork communication from sharing files andhardware devices to sending e-mail and videoconferencing.

  • 8/3/2019 OS module 1-A

    11/75

    Different OS

    Mainframe OS

    designed to optimize utilization of hardware.

    PC OS

    supports games, business applications, and thelike.

    Handheld OS

    designed to interface with the computer toexecute programs.

  • 8/3/2019 OS module 1-A

    12/75

    Primary goals of an OS

    1. Make the computer convenient to use

    2. Use the computer hardware in an efficientmanner.

  • 8/3/2019 OS module 1-A

    13/75

    Sizes of OS

    Its size & complexity depend on a number offactors:

    Computer system characteristics: (has one or more

    processors)

    Provides facilities: (allows interactive use or not?)

    Applications to support (allows many users to use thesame application simultaneously or not?)

  • 8/3/2019 OS module 1-A

    14/75

    Why study operating systems?

    In this course, we will NOTwrite OS but One of the largest and complicated system

    software.

    Draws on lots of areas Software Engineering, Computer Architecture, Data Structures,

    Networks and Algorithms etc.

    If certain things in the OS need to be changed,

    better understand them first!

    Can apply techniques used in an OS to other areas complex data structures, conflict resolution, concurrency,

    resource management

  • 8/3/2019 OS module 1-A

    15/75

    What does an OS do?

    It controls the function of the computersystem. OS includes programs that:

    Initializes the hardware Provides basic routine for device control Provides for the management, scheduling

    and interaction of tasks Maintain system integrity, and Handle errors

  • 8/3/2019 OS module 1-A

    16/75

    Where are OS found?

    Complexity of OS depends on the type offunctionality it provides:

    Some OS manage many users on a network.

    Found in petrol pumps, airplanes, videorecorders, washing machines and car engines.

  • 8/3/2019 OS module 1-A

    17/75

    What is a General Purpose OS?

    Provides the ability to run a number ofprograms.

    MS Windows, UNIX, Linux, etc.

  • 8/3/2019 OS module 1-A

    18/75

    Viewpoints of an OS

    Similar to a government

    Resource Allocator/Manager

    Control Program

    An extended machine

    Note: OS runs in a kernel/supervisor/monitor

    mode (protection from user by the hardware)

  • 8/3/2019 OS module 1-A

    19/75

    Single-user vs. Multi-user OS

    Single user OS provides access to the computersystem by a single user at a time. Examples are: Win95, WinNT, Win2K, Win XP

    Provides with the capability to perform tasks onthe computer system such as writing programsand documents, printing and accessing files

  • 8/3/2019 OS module 1-A

    20/75

    Single-user vs. Multi-user OS

    A multi-user OS allows more users to accessthe computer system at one time via network,thus accessing the system remotely from

    another terminal. Examples are UNIX and mainframes such as the

    IBM AS400.

  • 8/3/2019 OS module 1-A

    21/75

    Multi-user OS

    Advantages

    Hardware is very expensive, and it lets a numberof users share this expensive resource (reduced

    cost) Since resources are shared, they are more likely

    to be in use than sitting idle being unproductive.

    (increased resource utilization)

  • 8/3/2019 OS module 1-A

    22/75

    Multi-user OS

    Disadvantages

    More users slow down the performance of thesystem.

    Cost of hardware, requires a lot of disk spaceand memory.

    Multi-user OS cost is more than software for

    single-user.

  • 8/3/2019 OS module 1-A

    23/75

    Operating System Utilities

    OS consists of hundreds of thousands ofprogram codes and stored on hard disk.Portions of the OS are loaded into theRAM when needed.

    Utilities are provided for: Managing files and documents Development of programs and software Communicating with people and with other

    computer systems Managing user requirements for programs,

    storage space and priority.

  • 8/3/2019 OS module 1-A

    24/75

    OS Interfaces

    OS provides each user with an interfacethat accepts, interprets and executes user

    commands or programs.

    Shell or command line interpreter. (CLI)

    In some systems, this might be a simple line-

    by-line text mode (such as DOS or UNIX) orhighly graphical (such as Windows)

  • 8/3/2019 OS module 1-A

    25/75

    What is a multitasking OS?

    Provides the ability to run more than oneprogram at once.

    Each of these tasks the user is doing appearsto be running at the same time

    Advantage: increased productivity Disadvantage: more memory required.

  • 8/3/2019 OS module 1-A

    26/75

    Multitasking withOne program

  • 8/3/2019 OS module 1-A

    27/75

    Multitasking withTwo Programs

  • 8/3/2019 OS module 1-A

    28/75

    Multitasking withThree Programs

  • 8/3/2019 OS module 1-A

    29/75

    Utilization with multitasking

  • 8/3/2019 OS module 1-A

    30/75

    Evolution of OS

    Programmed in machine language and usedfront panel switches for input. The programmer is also the operator interacting with

    the computer directly from the system console(control panel).

    Introduce Device drivers (a subroutineperforming various I/O devices which involvescomplex sequences of device-specificoperations)

    Setup time is very high.

  • 8/3/2019 OS module 1-A

    31/75

    Evolution of OS

    Problems:

    Programmers needed to sign-up inadvance to use the computer one at a time.

    Executing a single program (often called

    job) required substantial time to setup thecomputer.

  • 8/3/2019 OS module 1-A

    32/75

  • 8/3/2019 OS module 1-A

    33/75

    A. Simple Batch Systems

    Similar jobs are batched and run together withno direct interaction between user and thecomputer during execution.

    Automatic job sequencing

    Computers are extremely valuable.

    Pre-OS: Resident Monitor Initial control in monitor Control transfers to job When job completes, control transfers back to

    monitor

  • 8/3/2019 OS module 1-A

    34/75

    Overlapped CPU and I/O operations

    Online Processing CPU is directly connectedto card readers and line printers

  • 8/3/2019 OS module 1-A

    35/75

    Overlapped CPU and I/O operations

    Off-line Processing

    Spooling Simultaneous Peripheral Operation Online.

    Uses disk as input device and for storing output files.

  • 8/3/2019 OS module 1-A

    36/75

    B. Multiprogrammed Batch Systems

    OS keeps several jobs in memory at a time andpicks and begins to execute one of the jobs inthe memory.

    Drawback: Causes the computer system to stopexecuting when the monitor encounters error(bug). Other jobs in the memory will not be

    executed as well.

  • 8/3/2019 OS module 1-A

    37/75

    C. Time sharing systems

    Interactive Computing Allows interaction between user and process.

    The CPU executes multiple jobs by switchingbetween them but the switches occur so

    frequently that users may interact with eachprogram while it is running.

    Monitor

    Job 1

    Job 2

    Job 3

    Job n

    T1

    T2

    T3

    T4

  • 8/3/2019 OS module 1-A

    38/75

    Time sharing systems

    Time sharing (or multitasking) is a logicalextension of microprogramming.

    Job A Job B

    0 5 10 15 20 25 30 35 40 time

    Uniprogramming: Job A and B end at time 36CPU is idle 47%I/O is idle 53

    CPU

    I/O

  • 8/3/2019 OS module 1-A

    39/75

    Time sharing systems

    pure multiprogrammingJob A and B end at time 20.

    0 5 10 15 time

    Job A Job B

    CPU

    I/O

  • 8/3/2019 OS module 1-A

    40/75

    Time-sharing mainframe withterminals

    Mainframe

    TerminalController

  • 8/3/2019 OS module 1-A

    41/75

    Sample problem #1:

    Consider a system designed to run only oneuser program at a time. Suppose the user isrunning a program designed to execute the ff

    sequence of instructions:while (not end of input) {

    read from the card readerprocess the data

    : :write to the printer: :

    }

  • 8/3/2019 OS module 1-A

    42/75

    Sample problem #1(cont.)

    Assuming that the computer system has thefollowing characteristics:

    Card reader: 300 cards / min.

    Line printer : 300 lines / min.

    CPU : 1 s/instruction

  • 8/3/2019 OS module 1-A

    43/75

    Sample problem #1(cont.)

    Suppose it takes about 10,000 instructions toprocess each line (one card) of input, then a cardwill require the ff:

    Input phase

    (1 min/ 300 cards) x (60,000 ms/min) = 200 ms

    Process phase

    (10,000 inst) x (1 s/inst) x (1 ms / 1000 s) = 10 ms

    Output phase

    (1 min/ 300 cards) x (60,000 ms/min) = 200 ms

    CPU utilization = (10 / 410) x 100% = 2.4 %

    Therefore, it shows poor CPU utilization

  • 8/3/2019 OS module 1-A

    44/75

    Its your turn

    Sample Question #2:Given the followingcharacteristics of a single-user system:

    Card reader : 600 cards /min

    Line printer : 100 lines /min CPU : 1 sec / instruction

    Suppose it takes 1,000 instructions to processeach line of input and produce one line of output,compute the CPU utilization, and input andoutput device utilization.

  • 8/3/2019 OS module 1-A

    45/75

    D. Personal Computer

    Personal Computer computer system dedicated to a single user

    I/O devices

    User convenience and responsiveness

    Adopt technology developed for larger OS oftenindividuals have sole use of computer and do not needadvance CPU utilization or protection features

    May run several different types of OS

  • 8/3/2019 OS module 1-A

    46/75

  • 8/3/2019 OS module 1-A

    47/75

  • 8/3/2019 OS module 1-A

    48/75

    Types of parallel systems

    Symmetric multiprocessing model (SMP) Each processor runs an identical copy of the OS

    and these copies communicate with each other

    Many processes can run at once withoutperformance deterioration

    Most modern OS support SMP systems

    CPU 1 CPU2 CPU3 CPU4

  • 8/3/2019 OS module 1-A

    49/75

    Types of parallel systems

    Asymmetric multiprocessing model (AMP)

    Each processor is assigned a specific task;master processor schedules, and allocated work

    to slave processors. More common in extremely large systems

    Master CPU

    Slaves CPU

  • 8/3/2019 OS module 1-A

    50/75

    Assignment

    Research on the differences betweenSymmetric and Asymmetric multiprocessingsystems in terms of their:

    Function

    Use / Application

    Give applications for each

  • 8/3/2019 OS module 1-A

    51/75

    F. Distributed Systems Distribute computation among several

    processors.

  • 8/3/2019 OS module 1-A

    52/75

    F. Distributed Systems Loosely coupled systems

    processors do not share memory or a clock, instead,each processor has its own local memory.

    Requires networking infrastructure LAN or WAN implementations May be either client-server of peer-to-peer systems

    Resources on each machine are managed by

    that machines OS and working together tomanage the collective network resources

    R f b ildi Di t ib t d

  • 8/3/2019 OS module 1-A

    53/75

    Reasons for building DistributedSystems

    Resource sharing

    Computation Speedup allows to distribute the computation among various

    sites. Movement of jobs is called load sharing

    Reliability

    Communications

  • 8/3/2019 OS module 1-A

    54/75

    Distributed Systems : Clustered

    Clustering allows two or more systems toshare storage.

    Provides high reliability

    Asymmetric clustering

    one server runs the application while otherservers standby

    Symmetric clustering

    all n hosts are running the application.

  • 8/3/2019 OS module 1-A

    55/75

    G. Real-time systems

    Used as a control device in a dedicatedapplication Eg. controlling scientific experiments, medical

    imaging systems, industrial control systems, and

    some display systemsReal-time OS

    Designed to support execution of tasks withinspecific clock time constraints.

    Correctness of a processing task is dependenton the clock time at which the processingoccurred

    Example: Windows XP, Mac OS X

  • 8/3/2019 OS module 1-A

    56/75

    Real-time systems

    Deadline (time critical) requirement well-defined fixed-time constraints.

    Eg. Industrial control systems, weapons

    systems, computer controlled products, ballisticmissile control systems, airline reservationsystems.

    Network to access Real time

  • 8/3/2019 OS module 1-A

    57/75

    Network to access Real-timeNetware server

    NETWORK

    Windows XP Windows XP

    Windows XP Mac OS X Netware server

    H dh ld S

  • 8/3/2019 OS module 1-A

    58/75

    Handheld Systems

    Personal Digital Assistants (PDAs)

    Cellular telephones

    Issues

    Limited memory

    Slow processors

    Small display screens

    (still true today?)

  • 8/3/2019 OS module 1-A

    59/75

    H. Embedded Systems

    Also known as dedicated systems.

    Perform a specific task only and cannot run awide variety of programs unlike general-

    purpose systems.

    Migration of OS Concepts and

  • 8/3/2019 OS module 1-A

    60/75

    Migration of OS Concepts andFeatures

  • 8/3/2019 OS module 1-A

    61/75

    Major Milestone in OS development

    UNIX (1968)

    8-bit OS

    First widely used multiuser , multitasking OS for

    minicomputers

    CP/M (1975)

    8-bit OS

    First OS that allowed serious business work onsmall personal computer. VisiCalc (1978) was thefirst business calculation program for CP/M.

  • 8/3/2019 OS module 1-A

    62/75

    Major Milestone in OS development

    MS-DOS (1980) 16-bit OS

    First OS for IBM PC family of computers. Lotus 1-2-3 and WordStar were introduced for PC.

    PC-DOS (1981) 16-bit OS

    IBM version of MS-DOS

    Mac OS (1984) 16-bit OS

    First graphical user interface OS that introduced

    the use of mouse to PC-based systems.

  • 8/3/2019 OS module 1-A

    63/75

    Major Milestone in OS development

    Mac OS X

    OS X is version 10 of the Apple Macintosh OS.

    First "complete revision" of the OS since the

    previous version is OS 9, with a focus onmodularity so that future changes would beeasier to incorporate.

    Incorporates support for UNIX -basedapplications as well as for those written just forthe Macintosh.

  • 8/3/2019 OS module 1-A

    64/75

    Major Milestone in OS development

    Mac OS X Original Mac OS X release has code name

    (name after big cats) Cheetah.

    Public Beta was called Kodiak Mac OS X 10.1 was called Puma

    Mac OS X 10.2 was called Panther

    Mac OS X 10.3 was called Jaguar

    Mac OS X 10.4 was called Tiger

    Mac OS X 10.5 was called Leopard (2007)

    Mac OS X 10.5 was called Snow Leopard

  • 8/3/2019 OS module 1-A

    65/75

    Major Milestone in OS development

    Linux

    Unix-like OS designed to provide PC users a freeor very low-cost OS

    Has a very efficient and fast-performing system.

    Linux's kernel was developed by LinusTorvalds at the University of Helsinki in Finland

    An acronym for Linus Unix.

  • 8/3/2019 OS module 1-A

    66/75

    Windows 3.0 (1990)

    16-bit OS

    First usable version of a graphical OS for the PC

    Windows for Workgroups (Windows 3.11)

    1993, 16-bit OS

    First Microsoft Windows with peer-to-peernetworking support for the PC.

    Major Milestone in OS development

  • 8/3/2019 OS module 1-A

    67/75

    Windows NT (New Technology) 1993, 32-bit OS

    Microsofts first attempt to bring a true 32-bit

    preemptive, multitasking OS with integratednetwork functionality offered in a workstation andserver versions.

    Windows 95 (1995) 16/32-bit OS Upgrade to Win 3.x with improved user interface,

    hardware support with 32-bit code, and providesbackward compatibility for 16-bit applications.

    Major Milestone in OS development

  • 8/3/2019 OS module 1-A

    68/75

    Major Milestone in OS development

    Windows 95

    Released on August 24, 1995

    Referred to as Windows 4.0 or by the internal

    codename Chicago

  • 8/3/2019 OS module 1-A

    69/75

    Windows 98 (1998) 32-bit OS

    Implemented many bugs fixes to Windows 95,

    more extended hardware support, and fully 32-bit.

    Windows 2000 (2000) 32-bit OS

    Revision of Win NT that is faster and morereliable, comes in several versions includingProfessional, Server, Advanced Server, andDataCenter.

    Major Milestone in OS development

  • 8/3/2019 OS module 1-A

    70/75

    Windows ME (Millennium Edition)

    2000, 32-bit OS

    Upgrade of Win 98 designed for home use with

    improved multimedia capabilities

    Windows XP (2001)

    32/64-bit OS

    Successor to Win Me 2000 Professional withHome, Professional, Tablet PC, and MediaCenter versions.

    Major Milestone in OS development

  • 8/3/2019 OS module 1-A

    71/75

    Major Milestone in OS development

    Windows XP

    Has a codename of Whistler

    Stands for eXPerience.

    XP shared the Whistler code-name with Windows2003 Server.

  • 8/3/2019 OS module 1-A

    72/75

    Windows Server 2003 (2003)

    32/64 bit OS

    Has Standard, Web, Enterprise, and DataCenter

    Editions designed as a server platform for MS.NET initiative which integrates all types ofdevices PC, handheld computers, cell phones,and home appliances for communications over

    the internet.

    Windows Vista (2008)

    Windows 7 (2009) - Windows 8

    Major Milestone in OS development

  • 8/3/2019 OS module 1-A

    73/75

    Assignment

    Research on other open-source OS (min. of10). Write important information regardingsuch OS including:

    Description and history

    Proponents and supporters

    Prog. Language used, OS which was based

    Year it was first release, and its versions Licensing, Server/workstation/mobile, others

    Print the OS milestone graph.

  • 8/3/2019 OS module 1-A

    74/75

    Mobile OS

    Symbian OS iPhone OS

    RIM's BlackBerry Windows Phone,

    Linux Palm WebOS,

    Android Maemo

  • 8/3/2019 OS module 1-A

    75/75

    End of Presentation