Presentation is loading. Please wait.

Presentation is loading. Please wait.

Device Management Ankur Saggar Nitin Golait Jason Foos Adam Estabrook.

Similar presentations


Presentation on theme: "Device Management Ankur Saggar Nitin Golait Jason Foos Adam Estabrook."— Presentation transcript:

1 Device Management Ankur Saggar Nitin Golait Jason Foos Adam Estabrook

2 Chapter 5 Outline I/O Subsystem – [Covered] I/O Strategies – [Covered] Device Manager Design – [Covered] Buffering Device Class Characteristics

3 Summary of topics Undertaken What is device Manager? Major Aims of Device Manager. I/O Strategies. Device Manager Design

4 Direct Memory Access Its also another way to increase the CPU utilization by offloading the processor from the burden of watching the status bits and feeding data to a device controller as is done in Programmed I/O. Its used with the devices that does large transfers. Under this a special purpose processor called DMA Controller performs the direct transfer between the device controller and main memory without help from CPU.

5

6 Memory mapped I/O To initiate the DMA transfer, the host writes a DMA command block into memory. This block contains a pointer to the source of transfer, a pointer to destination and the count of number of bytes. CPU writes the address of this command block to the DMA controller, then goes on with other work. DMA Controller proceeds to operate the memory bus directally without help from CPU. When the entire transfer is finished, the DMA controller interrupts the CPU.

7 Buffering Buffering is a technique thats employed by DM to keep I/O devices busy in times when Process doesnt requires I/O operations. Thus, it overlaps the device and CPU operation. Input Buffering – Technique of having the input device copy information into the primary memory before the process requests it. Output Buffering – Technique of Saving information in memory and then writing it to the device while the process continues execution.

8 Hardware Buffering Process Reads b(j) Controller reads b(j+1)

9 Double Buffering

10 Circular Buffering

11 Prerequisites for Buffering Device Driver must know enough about the way information is read from the device so that it can predict what data will be read in the near future. Thread behavior be conducive to buffering.

12 Device Class Characteristics Operating system distinguishes devices as being: 1) Block-oriented device 2) Character-oriented device

13 Communication Devices Communication devices are character oriented devices They transmit bytes of information between a computer and remote device

14 Communication Devices Generic Controller Local Devices Communications Controller Device Printer Modem Network Cable connecting the controller to the device BUS

15 Asynchronous Serial Devices These are character oriented devices. They exchange characters with the computer using explicit signals to control the transfer of each character. Asynchronous Serial Device controllers are typically implemented on a single chip (an UART) having computational power of a small microprocessor.

16 Storage Devices There are two types of storage devices: Sequentially accessed storage device Randomly accessed storage device Both are usually block-oriented; The data is read / written to device as a block of bytes.

17 Sequentially accessed Storage Device They physically store the blocks on a recording medium in a linear sequence. Bytes may or may not be stored linearly within the blocks.

18 Randomly accessed storage devices Allow the drivers to access the blocks on the device in an arbitrary order. Employ a block read/write interface between the controller and the device. The software intending to access information stored on a RASD should determine the order in which blocks should be read/ written on the device.

19 Magnetic Disk Information can be read from or written to the track of the disk by radial alignment of heads over the desired track. The number of physical records (blocks) stored on the disk is determined by the number of tracks, number of sectors and number of surfaces present in the disk.

20 Multi-surface Disk Track (cylinder) Sector Disk Surface Cylinders (Set Of Tracks)

21 Optimizing Algorithms for access on magnetic disk This is done in four ways: First Come First Serve (FCFS) This is a simple approach but does not give good performance. Shortest Seek Time First (SSTF) This gives good performance but is not optimal. It is also subject to starvation.

22 Scan and Look Disk Optimization All requests for each track is served. Both, scan and look serve every request in one complete pass through the disk. Thus, starvation is avoided. Circular Scan and Look Disk Optimizations Newly arrived requests will be serviced in a single scan of the disk, unlike Scan/Look algorithm where new request is not serviced for two full disk scans.

23 FCFS Disk Optimization algorithm 300 200 100 2004006008001000 Steps 76 17 29 12 137 269201 124 Track

24 SSTF Disk Optimization algorithm 300 200 100 200300400 29 76 17 12 124 137 201 269 Steps Track

25 Scan and Look Disk Optimization algorithm Scan Look 100200300400500 100 200 300 76 124 137 201 269 Track Steps

26 76 Circular Scan and Look Optimization algorithm 300 200 100 200 300 400500 Track Steps Circular Look Circular Scan 137 124 201 269 29 12 17

27 Data Storage Media CD-ROM (Compact Disk-Read Only Memory) Graphic data can be interspersed with audio information. It delivers 75 sectors per second. It consists of 2 modes: MODE 1-> 2048 bytes contains stored information and data MODE2->2324 bytes it is the usable storage size.

28 Rewritable CD Low power lasers are used to read the surface of the CD. High power lasers are used to write the surface of the CD. Mid-powered laser settings will remove logical pits from the surface, erasing the data previously written to the disk.

29 SUMMARY: Device Management is implemented across resource managers, device drivers and device handlers. System administrator can add devices and drivers without having to change the OS due to open systems. Optimizations increase device throughput and reduces an individual processs waiting time for I/O Storage technology increases with the development of the higher density disks, new storage media and faster access time.

30 Resources Nutt, Gary Operating Systems, Third Edition.


Download ppt "Device Management Ankur Saggar Nitin Golait Jason Foos Adam Estabrook."

Similar presentations


Ads by Google