Study of Complex Programs in Operating Systems | CMSC 412, Study notes of Operating Systems

Material Type: Notes; Professor: Hollingsworth; Class: Operating Systems; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 02/13/2009

koofers-user-jnh
koofers-user-jnh 🇺🇸

10 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
CMSC 412 - S98 (lect 02))
Announcements
lProgramming Assignment #1 is on the web page
lReading for next week:
Chapter 3 (sections 3.2 to 3.9)
lProgramming Assignment #0
files are available on the web page
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Study of Complex Programs in Operating Systems | CMSC 412 and more Study notes Operating Systems in PDF only on Docsity!

Announcements

l Programming Assignment #1 is on the web page

l Reading for next week:

  • Chapter 3 (sections 3.2 to 3.9)

l Programming Assignment

  • files are available on the web page

Why Study Operating Systems?

l They are large and complex programs

  • good software engineering examples

l There is no perfect OS

  • too many types of users
    • real-time, desktop, server, etc...
  • many different models and abstractions are possible
    • OS researchers have been termed abstraction merchants

l Many levels of abstraction

  • hardware details: where the bits really go and when
  • high level concepts: deadlock, synchronization

Computer Systems

l Computers have many different devices

  • I/O Devices
  • Memory
    • volatile storage
  • Processor(s)

Processor Memory

Mem. Controller

I/O Bus Controller

Memory Bus I/O Bus

SCSI Adapter Display Adapter SCSI Bus

Disk Drives Tape Drive^ Optical Drive

Network Adapter

Network

I/O Systems

l Many different types of devices

  • disks
  • networks
  • displays
  • mouse
  • keyboard
  • tapes

l Each have a different expectation for performance

  • bandwidth
    • rate at which data can be moved
  • latency
    • time from request to first data back

Issues In Busses

l Performance

  • increase the data bus width
  • have separate address and data busses
  • block transfers
    • move multiple words in a single request

l Who controls the bus?

  • one or more bus masters
    • a bus master is a device that can initiate a bus request
  • need to arbitrate who is the bus master
    • assign priority to different devices
    • use a protocol to select the highest priority item
      • daisy chained
      • central control

Disks

l Several types:

  • Hard Disks - rigid surface with magnetic coating
  • Floppy disks - flexible surface with magnetic coating
  • Optical (read only, write once, multi-write)

l Hard Disk Drives:

  • collection of platters
  • platters contain concentric rings called tracks
  • tracks are divided into fixed sized units called sectors
  • a cylinder is a collection of all tracks equal distant from the center of disk
  • Current Performance:
    • capacity: megabytes to tens of gigabytes
    • throughput: sustained < 10 megabytes/sec
    • latency: mili-seconds

I/O Interrupts

l Interrupt defined

  • indication of an event
  • can be caused by hardware devices
    • indicates data present or hardware free
  • can be caused by software
    • system call (or trap)
  • CPU stops what it is doing and executes a handler function
    • saves state about what was happening
    • returns where it left off when the interrupt is done

l Need to know what device interrupted

  • could ask each device (slow!)
  • instead use an interrupt vector
    • array of pointers to functions to handle a specific interrupt

I/O Operations

l Synchronous I/O

  • program traps into the OS
  • request is made to the device
  • processor waits for the device
  • request is completed
  • processor returns to application process

l Asynchronous I/O

  • request is made to the device
  • processor records request
  • processor continues program
    • could be a different one
  • request is completed and device interrupts
  • processor records that request is done
  • program execution continues