Docsity

Input/Output (I/O) Subsystem in Operating Systems - Prof. Prasad Kulkarni, Study notes of Operating Systems

Toggle sidebar
bg1
1
๎˜๎˜๎˜‚๎˜ƒ๎˜„๎˜…๎˜†๎˜‡๎˜„๎˜ˆ๎˜‰๎˜Š๎˜‹๎˜Œ๎˜๎˜Ž๎˜๎˜Š๎˜๎˜Œ๎˜‰๎˜„๎˜Š๎˜Œ๎˜„๎˜‘๎˜’๎˜“๎˜‹๎˜”๎˜Š๎˜๎˜‰๎˜•๎˜„๎˜ƒ๎˜–๎˜—๎˜Š๎˜“๎˜˜๎˜—๎˜„๎˜™๎˜„๎˜ƒ๎˜’๎˜‹๎˜๎˜‰๎˜•๎˜„๎˜š๎˜›๎˜›๎˜œ
๎˜๎˜‚๎˜ƒ๎˜„๎˜…๎˜†๎˜‡๎˜ˆ๎˜‰๎˜Š๎˜ˆ๎˜‹๎˜ˆ๎˜Œ๎˜๎˜…๎˜Ž๎˜๎˜๎˜†
โ– Terms and definitions
โ– Basic concepts
2
๎˜๎˜๎˜‚๎˜ƒ๎˜„๎˜…๎˜†๎˜‡๎˜„๎˜ˆ๎˜‰๎˜Š๎˜‹๎˜Œ๎˜๎˜Ž๎˜๎˜Š๎˜๎˜Œ๎˜‰๎˜„๎˜Š๎˜Œ๎˜„๎˜‘๎˜’๎˜“๎˜‹๎˜”๎˜Š๎˜๎˜‰๎˜•๎˜„๎˜ƒ๎˜–๎˜—๎˜Š๎˜“๎˜˜๎˜—๎˜„๎˜™๎˜„๎˜ƒ๎˜’๎˜‹๎˜๎˜‰๎˜•๎˜„๎˜š๎˜›๎˜›๎˜œ
๎˜‘๎˜†๎˜’๎˜๎˜๎˜๎˜…๎˜๎˜“๎˜๎˜”
โ– I/O subsystem
โ—component of the OS that implements the application โ€“ I/O device
interface
โ– Port
โ—connection point for an I/O device with the computer
โ—consists of data-in, data-out, status, and control registers
โ– Bus
โ—set of wires with protocol for what can be transferred on the bus
โ—PCI, PCI-X, PCIe, SCSI, HyperTransport, etc.
โ– Controller
โ—circuit to operate a port, a bus, or a device
โ—each device controller provides registers for the CPU to send data
and controls signals to that device
3
๎˜๎˜๎˜‚๎˜ƒ๎˜„๎˜…๎˜†๎˜‡๎˜„๎˜ˆ๎˜‰๎˜Š๎˜‹๎˜Œ๎˜๎˜Ž๎˜๎˜Š๎˜๎˜Œ๎˜‰๎˜„๎˜Š๎˜Œ๎˜„๎˜‘๎˜’๎˜“๎˜‹๎˜”๎˜Š๎˜๎˜‰๎˜•๎˜„๎˜ƒ๎˜–๎˜—๎˜Š๎˜“๎˜˜๎˜—๎˜„๎˜™๎˜„๎˜ƒ๎˜’๎˜‹๎˜๎˜‰๎˜•๎˜„๎˜š๎˜›๎˜›๎˜œ
๎˜•๎˜ˆ๎˜–๎˜—๎˜„๎˜๎˜˜๎˜ƒ๎˜Ž๎˜ˆ๎˜™๎˜๎˜ˆ๎˜š๎˜๎˜”๎˜ˆ๎˜›๎˜…๎˜‡๎˜๎˜˜๎˜…๎˜๎˜‡๎˜†
4
๎˜๎˜๎˜‚๎˜ƒ๎˜„๎˜…๎˜†๎˜‡๎˜„๎˜ˆ๎˜‰๎˜Š๎˜‹๎˜Œ๎˜๎˜Ž๎˜๎˜Š๎˜๎˜Œ๎˜‰๎˜„๎˜Š๎˜Œ๎˜„๎˜‘๎˜’๎˜“๎˜‹๎˜”๎˜Š๎˜๎˜‰๎˜•๎˜„๎˜ƒ๎˜–๎˜—๎˜Š๎˜“๎˜˜๎˜—๎˜„๎˜™๎˜„๎˜ƒ๎˜’๎˜‹๎˜๎˜‰๎˜•๎˜„๎˜š๎˜›๎˜›๎˜œ
๎˜œ๎˜๎˜Œ๎˜ˆ๎˜ž๎˜†๎˜˜๎˜‚๎˜ƒ๎˜๎˜๎˜”๎˜Ÿ๎˜”
โ– Polling
โ—during I/O, the computer does nothing but constantly monitor the
status register
โ—no other way to determine device status
โ—inefficient, wastes CPU resources
โ– Interrupts
โ—device asynchronously notifies the CPU on status changes
โ—I/O devices produce hardware interrupt, software interrupt is a
synchronous event in software
โ—save current execution state (context switch) and begin execution
of an interrupt service routine (interrupt handler)
โ—CPU typically provides 1-2 pins for indicating interrupts
โ—interrupts have priorities, may be maskable
โ—efficient
pf3

Partial preview of the text

Download Input/Output (I/O) Subsystem in Operating Systems - Prof. Prasad Kulkarni and more Study notes Operating Systems in PDF only on Docsity!

1

^  ^ ^  ^ ^       

n^ Terms and definitions n^ Basic concepts

 n I/O subsystem l component of the OS that implements the application โ€“ I/O deviceinterface n Port l connection point for an I/O device with the computer l consists of data-in , data-out ,^ status , and ^  ^ ^       

control^ registers

n^ Bus^ l^ set of wires with protocol for what can be transferred on the bus^ l^ PCI, PCI-X, PCIe, SCSI, HyperTransport, etc. n^ Controller^ l^ circuit to operate a port, a bus, or a device^ l^ each device controller provides registers for the CPU to send dataand controls signals to that device 3

^  ^  ^ ^       

^ 

^  n Polling l during I/O, the computer does nothing but constantly monitor thestatus register l no other way to determine device status l inefficient, wastes CPU resources n Interrupts l device asynchronously notifies the CPU on status changes l I/O devices produce^ hardware^ interrupt, ^  ^ ^       

software^ interrupt is a synchronous event in software l save current execution state (context switch) and begin executionof an interrupt service routine (interrupt handler) l CPU typically provides 1-2 pins for indicating interrupts l interrupts have priorities, may be maskable l efficient

5

^  !^ ^  ^ ^       

^ "#$ n Direct Memory Access l used to avoid^ programmed I/O^ for large data movement l DMA controller allows direct data transfers between memory anddevices (disk controllers, graphics controllers, network cards, etc.) l CPU initiates the DMA transfer l bypasses CPU to transfer data directly between I/O device andmemory l CPU free to do other tasks^  ^ ^       

7

 ^  ^ ^       

^ !% n Block device l stores information in fixed sized blocks l each block has its own address l generally use buffered input and output routines l e.g., disks n Character device l delivers or accepts a stream of characters l individual characters are not addressable l often use^ unbuffered^ input and output routines l e.g., keyboards, printers, network cards^  ^ ^