archsupport-02 - Architectural Support for Operating...

Info icon This preview shows pages 1–11. Sign up to view the full content.

Architectural Support for Operating Systems
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Announcements Required textbook should be in Cornell store soon (perhaps this week)
Image of page 2
Today’s material I/O subsystem and device drivers Interrupts and traps Protection, system calls and operating mode OS structure What happens when you boot a computer?
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Computer System Architecture Synchronizes memory access
Image of page 4
I/O operations I/O devices and the CPU can execute concurrently. I/O is moving data between device & controller’s buffer CPU moves data between controller’s buffer & main memory Each device controller is in charge of certain device type. May be more than one device per controller SCSI can manage up to 7 devices Each device controller has local buffer, special registers A device driver for every device controller Knows details of the controller Presents a uniform interface to the rest of OS
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Accessing I/O Devices Memory Mapped I/O I/O devices appear as regular memory to CPU Regular loads/stores used for accessing device This is more commonly used Programmed I/O Also called “channel” I/O CPU has separate bus for I/O devices Special instructions are required Which is better?
Image of page 6
Polling I/O Each device controller typically has: Data-in register (for host to receive input from device) Data-out (for host to send output to device) Status register (read by host to determine device state) Control register (written by host to invoke command)
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Polling I/O handshaking: To write data to a device: 1. Host repeatedly reads busy bit in status register until clear 2. Host sets write bit in command register and writes output in data-out register 3. Host sets command-ready bit in control register 4. Controller notices command-ready bit , sets busy bit in status register 5. Controller reads command register , notices write bit : reads data-out register and performs I/O (magic) 6. Controller clears command-ready bit , clears the error bit (to indicate success) and clears the busy bit (to indicate it’s finished)
Image of page 8
Polling I/O What’s the problem? CPU could spend most its time polling devices, while other jobs go undone. But devices can’t be left to their own devices for too long Limited buffer at device - could overflow if doesn’t get CPU service. Modern operating systems uses Interrupts to solve this dilemma. Interrupts: Notification from interface that device needs servicing Hardware: sends trigger on bus Software: uses a system call
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Interrupts CPU hardware has a interrupt-request line (a wire) it checks after processing each instruction. On receiving signal Save processing state Jump to interrupt handler routine at fixed address in memory Interrupt handler: Determine cause of interrupt.
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '07
  • VOLLSET
  • Operating Systems, OS, i/o devices, interrupt controller, interrupt handlers, Device Drivers Interrupt

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern