Chapter 2 operating system overview
This presentation is the property of its rightful owner.
Sponsored Links
1 / 38

Chapter 2 Operating System Overview PowerPoint PPT Presentation


  • 119 Views
  • Uploaded on
  • Presentation posted in: General

Operating Systems: Internals and Design Principles, 6/E William Stallings. Chapter 2 Operating System Overview. Operating System. A program that controls the execution of application programs An interface between applications and hardware. Evolution of Operating Systems. Serial processing

Download Presentation

Chapter 2 Operating System Overview

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Chapter 2 operating system overview

Operating Systems:Internals and Design Principles, 6/EWilliam Stallings

Chapter 2Operating System Overview


Operating system

Operating System

  • A program that controls the execution of application programs

  • An interface between applications and hardware


Evolution of operating systems

Evolution of Operating Systems

  • Serial processing

    • No operating system

    • Machines run from a console with display lights, toggle switches, input device, and printer


Evolution of operating systems1

Evolution of Operating Systems

  • Serial processing

    • Setup included loading the compiler, source program, saving compiled program, and loading and linking: mounting/dismounting tapes or setting up card decks

    • Schedule time

    • Problems with this type of machine sharing?


Evolution of operating systems2

Evolution of Operating Systems

  • Simple batch system

    • Monitor

      • Software that controls the sequence of events

      • Batch jobs together

      • Program returns control to monitor when finished


Job control language

Job Control Language

  • Special type of programming language

  • Provides instruction to the monitor

    • What compiler to use

    • What data to use


Hardware features

Hardware Features

  • Memory protection

    • Do not allow the memory area containing the monitor to be altered

  • Timer

    • Prevents a job from monopolizing the system


Hardware features1

Hardware Features

  • Privileged instructions

    • Certain machine level instructions can only be executed by the monitor

  • Interrupts

    • Early computer models did not have this capability

  • User mode vs. Kernel mode?


Memory protection

Memory Protection

  • User program executes in user mode

    • Certain instructions may not be executed

    • Certain memory areas are protected from user’s use and may not be accessed


Memory protection1

Memory Protection

  • Monitor executes in system mode

    • Kernel mode

    • Privileged instructions are executed

    • Protected areas of memory may be accessed


Limitations

Limitations?

  • Simple batch system

    • Monitor

      • Software that controls the sequence of events

      • Batch jobs together

      • Program returns control to monitor when finished

  • What are the limitations?


System utilization example

System Utilization Example


Uniprogramming

Uniprogramming

  • Processor must wait for (blocked) I/O instruction to complete before preceding


Program flow of control

Program Flow of Control


Program flow of control1

Program Flow of Control


Multiprogramming

Multiprogramming

  • When one job needs to wait for I/O, the processor can switch to the other job


Multiprogramming1

Multiprogramming


Example

Example


Utilization histograms

Utilization Histograms


Time sharing systems

Time Sharing Systems

  • Using multiprogramming to handle multiple interactivejobs

  • Processor’s time is shared among multiple users

  • Multiple users simultaneously access the system through terminals

  • How would Time Sharing Systems differ from Batch Multiprogramming Systems?


Batch multiprogramming versus time sharing

Batch Multiprogramming versus Time Sharing

  • How would you schedule the following jobs: J1(0, 100), J2(1, 10), J3(2, 3), J4(3, 5), J5(4, 2)

    • in a batch system

    • in a time-sharing system


Ctss operation

CTSS Operation


Os design challenges

OS Design Challenges

  • Time sharing and multiprogramming lead to challenges in

    • Process management (multiple programs time share the system, mutual exclusion, synchronization, resource contention etc)

    • Memory management (OS, multiple programs are in the memory)

    • Scheduling of processor(s) and I/O device


Operating system objectives

Operating System Objectives

  • Convenience

  • Efficiency

  • Ability to evolve


Four interfaces

Four Interfaces

  • Figure 3-6. Various interfaces offered by computer systems.


Four interfaces 1

Four Interfaces (1)

  • An interface between the hardware and software consisting of machine instructions

    • that can be invoked by any program


Four interfaces 2

Four Interfaces (2)

  • An interface between the hardware and software, consisting of machine instructions

    • that can be invoked only by privileged programs, such as an operating system


Four interfaces 3

Four Interfaces (3)

  • An interface consisting of system calls as offered by an operating system


Four interfaces 4

Four Interfaces (4)

  • An interface consisting of library calls

    • Generally forming what is known as an application programming interface (API)

    • In many cases, the aforementioned system calls are hidden by an API


Layers and views

Layers and Views


Services provided by the os

Services Provided by the OS

  • Program development

    • Editors and debuggers

      • e.g., emacs, vi, gdb

  • Program execution

    • Load instructions & data, control scheduling

  • Access I/O devices

    • Hide the peculiar I/O instructions or control signals required for each device, access it by simple read and write function calls


Services provided by the os1

Services Provided by the OS

  • Controlled access to files

    • Control who can access which files

  • System access

    • Protect resources and data from unauthorized users

    • Resolve conflicts for resource contention


Services provided by the os2

Services Provided by the OS

  • Error detection and response

    • Internal and external hardware errors

    • Software errors

    • Operating system cannot grant request of application


Services provided by the os3

Services Provided by the OS

  • Accounting

    • Collect usage statistics

    • Monitor performance

    • Used to anticipate future enhancements

    • Used for billing purposes


Operating system1

Operating System

  • Responsible for managing resources

    • Memory, processor, I/O devices

  • Functions same way as ordinary computer software

    • It is a program that is executed

  • Operating system relinquishes control of the processor, but directs the processor so that the processor will allow it to regain control


Os as resource manager

OS as Resource Manager


Kernel

Kernel

  • Portion of operating system that is in main memory

  • Contains most frequently used functions

  • Also called the nucleus


Evolution of operating systems3

Evolution of Operating Systems

  • Hardware upgrades plus new types of hardware (for instance, paging hardware)/ New services / Fixes


  • Login