Contact Information - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Contact Information

Description:

Textbook: Operating System Concepts, 7th edition, Silberschatz, Galvin, and Gagne. ... System Components. Components of a Computer System. Operating System: ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 23
Provided by: philld
Category:

less

Transcript and Presenter's Notes

Title: Contact Information


1
Contact Information
  • Office 225 Neville Hall
  • Office Hours Monday and Wednesday 1200-100 and
    by appointment.
  • E-Mail dickens_at_umcs.maine.edu
  • Phone 581-3967
  • Textbook Operating System Concepts, 7th edition,
    Silberschatz, Galvin, and Gagne.
  • URL http//umcs.maine.edu/dickens/COS431/COS431.
    html

2
Components of a Computer System
  • A computer system consists of
  • hardware
  • system programs
  • application programs

3
System Components
  • Hardware
  • Physical Devices
  • Memory, CPU, I/O devices.
  • Micro-architecture Executes machine-level
    instructions. Hardware or firmware (microcode).
  • Machine language Hardware and instructions
    visible to an assembly language program.

4
Components of a Computer System
  • Operating System
  • Hides complexity of hardware and provides
    simplified set of instructions (API, Application
    Program Interface).

5
Components of a Computer System
  • System programs
  • Generally execute in user mode. (Why?)
  • Command interpreter (shell), compilers, editors,
    ..

6
So What is an Operating System?
  • It is an extended machine
  • Hides the messy details.
  • Presents user with a virtual machine, easier to
    use
  • Dont want to program I/O devices, handle
    interrupts, etc.
  • It is a resource manager (and scheduler)
  • Each program gets time with the resource
  • E.g., CPU, I/O devices, memory
  • Each program gets space on the resource
  • E.g., Disk space.

7
So What is an Operating System?
  • Control Program
  • Manages the execution of user applications to
    prevent errors and improper use of system.
  • Program A should not be able to access memory of
    an unaffiliated program B.
  • No one user should be able to starve OS and/or
    other users of system resources (e.g., CPU).
  • No user should be able to trash I/O devices
    (deliberately or by error).

8
Computer Hardware Review
Monitor
Bus
  • Components of a simple personal computer

9
  • Special registers
  • Program counter.
  • Stack pointer.
  • Process Status Word (PSW).

10
  • CPU and other devices can run concurrently.
  • When device needs attention, it issues an
    interrupt.
  • Character transferred from keyboard to system
    buffer.
  • Disk read/write completed.
  • Page fault.
  • User programs generate interrupts when making
    system calls.
  • Trap instruction.
  • Generally termed software interrupt.

11
Interrupts
  • Operating systems are interrupt-driven.
  • Perform action, such as executing a process, then
    wait until receives an interrupt.
  • Makes developing an operating system a very
    complex task.
  • When an interrupt is generated the CPU stops what
    it is doing and execution is transferred to the
    appropriate interrupt handler.
  • Addresses of interrupt handlers are found in the
    interrupt vector.
  • Table of addresses
  • Each device has a particular offset within the
    table.

12
Interrupts
  • The state of the interrupted computation must be
    saved before interrupt can be processed.
  • This state is restored when the OS returns from
    the interrupt handler.
  • Termed a context switch.

13
I/O Devices
  • Each type of device has its own controller that
    accepts and carries out commands from the
    operating system.
  • Because each controller is different,
    manufacturer provides device driver for each
    operating system it supports.
  • OS talks to device driver.

14
I/O Operation
  • Program makes I/O request (e.g., read/write
    to/from a file).
  • Device driver loads appropriate controller
    registers.
  • Controller reads registers and determines the
    operation requested.
  • Starts data transfer from the device to its local
    buffer.
  • When completed, generates an interrupt.
  • State of currently executing program is saved.
  • Interrupt handled by the device driver.
  • Device driver returns control to the OS.
  • OS restarts suspended program.

15
(a)
(b)
  • (a) Steps in starting an I/O device and getting
    interrupt
  • (b) How the CPU is interrupted

16
Three I/O Methods
  • Synchronous
  • Asynchronous
  • DMA (Direct Memory Access).

17
Three I/O Methods
  • Synchronous
  • After I/O starts, control returns to user program
    only upon I/O completion.
  • Wait instruction idles the CPU until the next
    interrupt
  • Wait loop (contention for memory access).
  • Generally a bad idea.

18
I/O Methods
  • Asynchronous
  • After I/O starts, control returns to user program
    without waiting for I/O completion.
  • I/O completion signaled by an interrupt.
  • More complicated than synchronous I/O.

19
Two of the I/O Methods
Synchronous
Asynchronous
20
I/O Methods
  • DMA
  • Used for high-speed I/O devices able to transmit
    information at close to memory speeds.
  • Device controller transfers blocks of data from
    buffer storage directly to main memory without
    CPU intervention.
  • Only one interrupt is generated per block, rather
    than the one interrupt per byte.

21
I/O Methods
  • Asynchronous I/O requires the ability to handle
    multiple I/O commands concurrently.
  • Uses device status table.
  • Queue waiting requests.

22
Device-Status Table
Write a Comment
User Comments (0)
About PowerShow.com