1 / 8

Channel Programming

Channel Programming. Goals Offload data movement work from Processor (like DMA on PCs) Minimize Interrupts (very disruptive) Improve device utilization How

svickers
Download Presentation

Channel Programming

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Channel Programming Goals Offload data movement work from Processor (like DMA on PCs) Minimize Interrupts (very disruptive) Improve device utilization How “Program” the device and channel so that they accomplish very complex activities without the processor being involved

  2. Channel Programming Channel Command Words (CCWs) Each one is an instruction to the channel and/or device Channel Program A sequence of CCWs to do an IO function “A program for the channel to execute” Note: a unconditional branch op code (TIC) allows the program to transfer to another real memory location An IO operation starts by assigning a hardware channel to a channel program. At the end of the program, an IO interrupt occurs which has status information about the operation.

  3. Channel Programming CCW format (see fig IO.4) Op code – command to channel and device e.g. print and space a line Count – The number of bytes to move Address – the location of the bytes in memory. This is a real Address and cannot be paged out until the IO is complete Flag Byte – additional command information (next foil)

  4. Channel Programming CCW Flag Byte – (most significant bits) - Command Chain- after this CCW execute next CCW - Data Chain – after count of current CCW is used, continue data movement using count and address field from next CCW. e.g. Scatter/Gather data to/from memory - Program Controlled Interrupt(PCI) – Cause an IO Interrupt when this CCW is executed (but continue with the operation). e.g. Notify OS about Channel position in the Channel Program - Indirect Data Address List(IDAW)- The address of a list of data addresses which are used when the data transfer crosses page boundaries i.e. use next address in list when data transfer crosses a real page boundary. e.g. an IO buffer is contiguous in Virtual memory but crosses into multiple non-contiguous real pages

  5. Channel Programming IO Interrupt Information - Identity of the device that caused the interrupt - Completion Status Channel end (CE)- channel ended it's operation Device end(DE) – device ended it's operation Unit Exception(UE)- Exception condition at device e.g. Printer out of paper Unit Check – Problem at device e.g. Paper jam Multiple conditions can be reported on one interrupt e.g. CE and DE are a normal situation

  6. Channel Programming Example Spooling Subsystem 1.During Program Execution -OS provides a “virtual” printer -Lines sent to printer are packed into a buffer Assume packed 40 lines to 1 4K buffer -When buffer is filled,it's written to disk (Spool area) -Double buffered so program doesn't wait for disk write -Impact Fewer interrupts 1 disk IO every 40 lines Execution time lower – disks faster than printer

  7. Channel Programming Example 2. During Printing Lines are printed from Buffer -by a chain of CCWs created by Spooling subsystem -40 lines printed with 2 IO Interrupts (at end of printout and disk read) -Double buffer so printer doesn't wait for disk Impact -Fewer Interrupts ( one printer interrupt for 40 lines) -Printer runs fast (never waits for application) - able to share 1 printer between multiple jobs Note: can dynamically modify channel program for even fewer interrupts

  8. Channel Programming Goals

More Related