1 operating systems foundations students

Upload: prashantinnit

Post on 30-May-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 1 Operating Systems Foundations Students

    1/49

    K Sathyababu Dept of CSE NIT Rour

    Operating SystemFoundations

    Department of Computer Science & EngineeringNational Institute of Technology Rourkela.

    Presented by

    Korra Sathya Babu

  • 8/14/2019 1 Operating Systems Foundations Students

    2/49

    K Sathyababu Dept of CSE NIT R

    Basic Computing

    Computer Components

    CPU, Memory, I/O, Interconnection and respective

    software

    Why OS ?

    Before OS ?

  • 8/14/2019 1 Operating Systems Foundations Students

    3/49

    K Sathyababu Dept of CSE NIT R

    Operating System An Operating System is a layer of software on a bare machine

    that supports two functions

    User friendliness

    Resource management

    Example:

    OS-X, Windows, Linux, BSD,

    .......(Desktop, Server)

    Symbian, JavaOS (Cell phones)

    Vx Works, pSOS (real-time)

    .......

  • 8/14/2019 1 Operating Systems Foundations Students

    4/49

  • 8/14/2019 1 Operating Systems Foundations Students

    5/49

    K Sathyababu Dept of CSE NIT R

    Mill of an Analytical Engine

  • 8/14/2019 1 Operating Systems Foundations Students

    6/49

    K Sathyababu Dept of CSE NIT R

    The Atanasoff-Berry Computer the First Electronic

    Computer - John Atanasoff and Clifford Berry

  • 8/14/2019 1 Operating Systems Foundations Students

    7/49

    K Sathyababu Dept of CSE NIT R

    Z3- Konrad ZuseGerman engineer, Konrad Zuse Z3very sophisticated for its time utilized the binary number system and handle floating-

    point arithmeticuse relays because they were more readily available

  • 8/14/2019 1 Operating Systems Foundations Students

    8/49

    K Sathyababu Dept of CSE NIT R

    COLOSSUS Alan Turing

    COLOSSUS - electronic

    machine to decode the

    Geheimfernschreiber cipher

    comprised 1,800 vacuumtubes

  • 8/14/2019 1 Operating Systems Foundations Students

    9/49

    K Sathyababu Dept of CSE NIT R

    The Harvard MARK I Computer- Howard Aiken and Grace Hopper

    Harvard Mark 1 Computer

  • 8/14/2019 1 Operating Systems Foundations Students

    10/49

    K Sathyababu Dept of CSE NIT R

    The ENIAC I Computer

    J Presper Eckert and John Mauchly

    U.S. Army PhotoThe ENIAC, in BRL building 328

  • 8/14/2019 1 Operating Systems Foundations Students

    11/49

    K Sathyababu Dept of CSE NIT R

    1944 AD to 1952 AD

    The First Stored Program Computer -- EDVAC

  • 8/14/2019 1 Operating Systems Foundations Students

    12/49

  • 8/14/2019 1 Operating Systems Foundations Students

    13/49

    K Sathyababu Dept of CSE NIT R

    Punched Card

  • 8/14/2019 1 Operating Systems Foundations Students

    14/49

    K Sathyababu Dept of CSE NIT R

    Serial Processing

    No operating system

    Machines run from a console with display lights, toggle

    switches, input device, and printer

    Schedule time

    Setup included loading the compiler, source program,

    saving compiled program, and loading and linking

    This had two main problems

    Scheduling

    Setup time

  • 8/14/2019 1 Operating Systems Foundations Students

    15/49

    K Sathyababu Dept of CSE NIT R

    Batch Processing

    Early batch system

    bring cards to 1401

    read cards to tape

    put tape on 7094 which does computing

    put tape on 1401 which prints output

  • 8/14/2019 1 Operating Systems Foundations Students

    16/49

    K Sathyababu Dept of CSE NIT R

    Structure of a typical FMS job 2nd generation

    Batch jobs are set up so they can be run to completion without human interaction,

    so all input data is preselected through scripts or command-line parameters. This is

    in contrast to "online" or interactive programs which prompt the user for such input.

  • 8/14/2019 1 Operating Systems Foundations Students

    17/49

  • 8/14/2019 1 Operating Systems Foundations Students

    18/49

    K Sathyababu Dept of CSE NIT R

    4004 Microprocessor Family

  • 8/14/2019 1 Operating Systems Foundations Students

    19/49

    K Sathyababu Dept of CSE NIT R

    From 3rd Generation OS

    Small Scale Integration of transistors on asingle chip

    OS/360 (1964) for IBM MainframeSystem/360

    OS/360 was a group of batch processingOS The direct access storage devices were

    made as a prerequisite for the operation of

    OS/360 More resources: http://www.beagle-ears.com/lars/engineer/comphist/ibm360.htm#opsys

    http://www.beagle-ears.com/lars/engineer/comphist/ibm360.htmhttp://www.beagle-ears.com/lars/engineer/comphist/ibm360.htm
  • 8/14/2019 1 Operating Systems Foundations Students

    20/49

    K Sathyababu Dept of CSE NIT R

    Multiprogramming System

    three jobs in memory 3rd generation

  • 8/14/2019 1 Operating Systems Foundations Students

    21/49

    K Sathyababu Dept of CSE NIT R

    Spooling

    simultaneous peripheral operations on-line refers

    to putting jobs in a buffer, a special area in

    memory or on a disk where a device can access

    them when it is ready.

    Spooling is useful because devices access data

    at different rates. The buffer provides a waiting

    station where data can rest while the slower

    device catches up.

  • 8/14/2019 1 Operating Systems Foundations Students

    22/49

    K Sathyababu Dept of CSE NIT R

    Time Sharing Systems (Multitasking)

    Users demand for quick response

    A derivative of Multiprogramming

    First General purpose time sharing system CTSS (Compatible Time Sharing System)developed by MIT

    The term time-sharing is no longer commonlyused, having been replaced by simplymultitasking.

  • 8/14/2019 1 Operating Systems Foundations Students

    23/49

  • 8/14/2019 1 Operating Systems Foundations Students

    24/49

    K Sathyababu Dept of CSE NIT R

    UNIX

    Dennies Ritche with Ken Thompson in 1971

    Multics renamed as UNIX PDP 11/20

    UNIX first written in Assembly level Language

    Various versions of UNIX (V1 to V7) confined to MIT 1979 UNIX development developed into two camps

    System V model by AT & T

    BSD (Berkeley Software Distribution) by University of

    California Two Models diverged into different implementations

    Linux by Linus Torvolds

  • 8/14/2019 1 Operating Systems Foundations Students

    25/49

  • 8/14/2019 1 Operating Systems Foundations Students

    26/49

    K Sathyababu Dept of CSE NIT R

    MAC evolution

    Doug Engelbart of Stanford GUI with

    windows, icons, mouse, menus etc

    XEROX PARC machines used GUI

    Steve Jobs Apple started Apple with

    GUI (Lisa)

    Jobs second attempt Machintosh was agreat success becos of Userfriendlyness

  • 8/14/2019 1 Operating Systems Foundations Students

    27/49

    K Sathyababu Dept of CSE NIT R

    MS Windows evolution

    Inspired by MACs success goes for GUI based MS-DOS

    Produced GUI based Shell running on MS-DOS (85 to 95)

    1995 MS Windows plans for free standing OS still booting with MS DOS.

    1998 MS comes with higher version of MS Win 95, MS Windows 98 (16 bit)

    MS Win NT (New Technology) was rewritten from scatch

    Designer of Win NT was David Cutler (designer of VAX VMS OS). Majorityof VMS ideas were in Win NT (VAX sued MS)

    Win NT 4.0 able to kill DOS to a great extent

    Early 1999 Win NT 5.0 (successor of Win 98 and Win NT) - renamed asWindows 2000 (but failed)

    Came out with another version of Win 98 called Win ME

    2001- slightly upgraded version of Win 2000 called Win XP released (had 6years run)

    2007 Win Vista successor to XP released

  • 8/14/2019 1 Operating Systems Foundations Students

    28/49

    K Sathyababu Dept of CSE NIT R

    Other major contenders in PC

    World

    Unix strongest in network and enterprise servers

    Linux becoming alternative to Windows

    FreeBSD is also another popular derivative of UNIX

    UNIX also strong on workstations powered by highperformance RISC chips

    X Windows systems (X11)

    Gnome or KDE run on top of X11 giving windows orMac look for UNIX

    Network operating systems Real time operating systems

    Distributed operating systems

  • 8/14/2019 1 Operating Systems Foundations Students

    29/49

    K Sathyababu Dept of CSE NIT R

    Review

    Transparency, distributed

    control

    Resource Sharing90sDistributed

    Real time schedulingMeet deadline80sReal Time

    Time slice, round robin

    scheduling

    Good Response Time70sTime Sharing

    Program Priorities and

    preemption

    Resource Utilization70sMultiprogramming

    Spooling, Turn around timeCPU idle time60sBatch processing

    Key conceptsPrime concernPeriodOS Class

    C t H d R i

  • 8/14/2019 1 Operating Systems Foundations Students

    30/49

    K Sathyababu Dept of CSE NIT R

    Computer Hardware Review

    (Basic Computer Components)

    Components of a simple personal computer

  • 8/14/2019 1 Operating Systems Foundations Students

    31/49

    K Sathyababu Dept of CSE NIT R

    Processor

  • 8/14/2019 1 Operating Systems Foundations Students

    32/49

    K Sathyababu Dept of CSE NIT R

    Computer Hardware Review

    (Pipelining)

    (a) A three-stage pipeline

    (b) A superscalar CPU

  • 8/14/2019 1 Operating Systems Foundations Students

    33/49

    C H d R i

  • 8/14/2019 1 Operating Systems Foundations Students

    34/49

    K Sathyababu Dept of CSE NIT R

    Computer Hardware Review

    (Disks)

    Structure of a disk drive

  • 8/14/2019 1 Operating Systems Foundations Students

    35/49

    K Sathyababu Dept of CSE NIT R

    Computer Hardware Review (5)

    One base-limit pair and two base-limit pairs

  • 8/14/2019 1 Operating Systems Foundations Students

    36/49

    K Sathyababu Dept of CSE NIT R

    Computer Hardware Review (6)

    (a) Steps in starting an I/O device and getting interrupt

    (b) How the CPU is interrupted

    (a) (b)

  • 8/14/2019 1 Operating Systems Foundations Students

    37/49

    K Sathyababu Dept of CSE NIT R

    Computer Hardware Review (Bus)

    Structure of a large Pentium system

  • 8/14/2019 1 Operating Systems Foundations Students

    38/49

    K Sathyababu Dept of CSE NIT R

    Software

    System S/w Application S/w

    System Development

    ProgramsSystem Mgmt Programs

    Operating Systems

    Device Drivers

    System Utilities

    Loaders

    Linkers

    Translators

    Word Processors

    Presentation tools

    Spread Sheets

    DBMS

    Editors

    -Backups

    -Virus Protection

    -Disks

    -Compiler

    -Interpreter

    - Assembler

  • 8/14/2019 1 Operating Systems Foundations Students

    39/49

    K Sathyababu Dept of CSE NIT R

    Review of Last Class

    Various computing Strategies were covered

    (Serial processing, batch processing,

    Multiprogramming, Multitasking, Real time,

    Distributed) Since Operating System is in between a user and

    bare machine, we have given an overview of

    basic components of a computer

    Also we have gone through software divisions

  • 8/14/2019 1 Operating Systems Foundations Students

    40/49

    K Sathyababu Dept of CSE NIT R

    Booting

    ROM BIOScontains low level S/w including to read keyboard, write onscreen and do disk I/O and other

    Now a days even stored in Flash RAMs

    Process of Booting

    Scans ISA and PCI buses to check if all devices are connected

    RAM, keypad and other devices are responding or not

    Checks for boot device in CMOS memory (first from floppy, CD-ROMthen disk for software configure)

    The 1st Sector from boot device is read to memory and executed

    This program examines partition tables for active partitions

    Then second boot loader is read from that partition

    The loader reads the OS from that partition and starts it

    The OS then queries BIOS to get the configuration details

    For each device the OS checks to see if it has device drivers

    On Finding the device drivers the OS loads them into kernel

    Then initialize the tables and performs background processes and startsthe shell

  • 8/14/2019 1 Operating Systems Foundations Students

    41/49

    K Sathyababu Dept of CSE NIT R

    Shell

    Users physical interaction

    Different types of shells of different

    operating systems

    Benefit of shell

  • 8/14/2019 1 Operating Systems Foundations Students

    42/49

    K Sathyababu Dept of CSE NIT R

    Instruction Execution

    Fetch Cycle

    Decode Cycle

    Operand Fetch Cycle

    Execute CycleFour cycles are called Instruction Cycle orComputer Cycle.

    Interrupt Cycle

  • 8/14/2019 1 Operating Systems Foundations Students

    43/49

    K Sathyababu Dept of CSE NIT R

    Interrupts

    External (H/w and I/O Interrupts)

    Internal (page fault, segment fault,

    exception handling and other S/w

    interrupts)

    Interrupts may be sync or async

  • 8/14/2019 1 Operating Systems Foundations Students

    44/49

    K Sathyababu Dept of CSE NIT R

    System Calls It is a method by which user programs

    makes a request to Operating Systems System Calls vary from OS to OS

    Only System Call enters the Kernel and

    Procedure calls do not

    Explanation with example of read

    instruction

  • 8/14/2019 1 Operating Systems Foundations Students

    45/49

    K Sathyababu Dept of CSE NIT R

    Goals of an OS

    Efficiency (high throughput)

    Convenience (user friendliness, good service,

    support for new programming languages etc.)

    Scalability (Ability to involve) (Plug & play)

    Reliability (support applications, secure

    them, recover when failure etc.)

    Portability (machine independent)

  • 8/14/2019 1 Operating Systems Foundations Students

    46/49

    K Sathyababu Dept of CSE NIT R

    Functions of an OS

    Process Management

    Memory Management

    File Management

    Device Management

    Protection Management

    User Interface

  • 8/14/2019 1 Operating Systems Foundations Students

    47/49

    K Sathyababu Dept of CSE NIT R

    Different Operating Systems Mainframe OS (oriented towards processing many jobs

    at a time)

    Server OS (serve multiple users at once over a networkallow sharing of resources)

    Multiprocessor OS (load sharing towards other systems)

    Personal Computer OS (focus on providing good serviceto single user)

    Handheld Computer OS (or PDA OS supports smallnumber of functionalities)

    Embedded OS (run on microcontrollers to providespecific applications)

    Sensor Node OS Real-Time OS (oriented for fast responses)

    Smartcard OS ()

  • 8/14/2019 1 Operating Systems Foundations Students

    48/49

    K Sathyababu Dept of CSE NIT R

    OS Structures

    Monolithic Kernel

    Layered Systems

    Microkernel

    Client Server Model

    Virtual Machines

    Exokenels

  • 8/14/2019 1 Operating Systems Foundations Students

    49/49

    K Sathyababu Dept of CSE NIT R

    Monolithic approach