Device Management (week 4) Flashcards
I/O systems are designed to handle_______ which are of many magnitudes __________ than the slowest CPU
I/O devices
slower
for efficient performance, there should be as much overlap as possible between the
operation of the ___________
I/O devices and the CPU
what is device manager
manages the collection of device driveres
what does the device manager do
manages the collection fo device drivers
makes it possible for the OS to then provide a standard set of system calls to application programs, which use the devices
what do device drivers do ?
A system call might mean different things to different devices. This system call has to be interpreted so that the devices can work. Devices drivers are used to interpret the system calls to ensure that the devices work properly.
device driver is the __________ module
device-dependent (comes with equipment you purchased)
device manager is the ________ module
device independent
what are the 3 categories of devices
block
character
network
storage devices are classified into 2 categories called
sequential
direct access
what is device status table
device status table is used by the device manager to keep track of the various devices
what information does the device status table contain
device id
device status (done, busy, idle)
queue of processing waiting for the device
what do programs which perform I/O operations expect
expect the IO operation to be completed before the next statement is executed
how can there be a performance gain
we can make the program execute instructions while the IO is taking place
this should be done without violating the serial execution order of the program
what is the main problem in trying to integrate many different devices into the computer system
different devices have different characteristics and thus require different methods to access or use.
To use these devices, application programs need to know every device’s characteristics and methods of access. This is not practically possible as new devices are produced all the time
How does the OS solve the problem of trying to integrate many different devices into the computer system
OS provides abstraction through its device manager which standardizes the interface required to use all the devices in each class. Application programs just need to know a standard device interface to use all the devices in that class. (FOR EG ALL TYPES OF SCANNERS ETC)
how to maximize the IO
to maximize the IO, the CPU can be used to operate on another process when the IO is busy with the original process.
this will increase the efficiency of the computer and reduce the overall time required to execute all the processes
what are the 3 techniques used by the OS to optimize the use of devices
–> overlapping processing & IO operations
–> buffering
–> disk optimization
how does buffering work
buffering allows the CPU to temporarily store/read data to/from memory when transferring data to/from devices. This allows the device controller to do the actual transfer when the CPU is doing other things,
what is the difference between device driver and device controller
device driver is implemented at the software level
device driver is a software program that allows a device to communicate with the operating system
device controller is implemented at the hardware level
device controller is a hardware unit that acts as an interface between the device and the device driver
what are the different types of buffering
input buffering
output buffering
hardware buffering
double buffering
circular buffering
what is input buffering
copies the data into memory before the process requests it
what is output buffering
temporarily stores the data in memory and have it written out to the device when the process resumes execution
what is hardware buffering
Implements buffering in the hardware by having specialized registers to act as buffers. This is also known as cache
what is double buffering
implement hardware buffering and having a separate buffer implemented at the software level
for eg using primary memory as a buffer
what is circular buffering
having a buffer which contains n number of locations. This incresased number of buffers allows for more data to be stored in the buffer
circular buffering is the technique of managing these locations so that they can be reused
what are character devices
character based devices (tty/terminal) and serial based devices are where the data is handled one character or byte at a time
what are block type devices
block type devices such as hard drives transer data in blocks, typically a multiple of 256 bytes
________- and ________ are naming conventions for disk devices
sda, sda1
___________ and ________ are naming conventions for terminal devices or virtual consoles
tty0, tty1
what are types of randomly accessed memory devices
flash memory
optical drives
rotating magnetic disk
floppy disk
what is sequentially accessed storage
magnetic tapes
what are the properties of randomly accessed storage devices
–> allows a driver to access blocks of data in the device in any order. Need not be sequential
–> Non-volatile memory (such as USB memory devices) also falls in this category
–> can easily be managed using a common api
Although disk based devices are random, we can improve on
their efficiency using _____________________
disk optimization
techniques
How can the effectiveness of disk based devices be increased ?
they can be increased in a multiprogramming environment where data blocks
can be read from a large range of locations in
the disk.
what is transfer time
Time to copy bits from disk
surface to memory
what is Disk latency time
Rotational delay waiting
for proper sector to rotate under R/W head
what is Disk seek time
Delay while R/W head
moves to the destination track/cylinder
how to calculate Access Time
seek + latency + transfer
what are the 4 disk-based optimization techniques?
First-Come-First-Serve (FCFS)
Shortest Seek Time First (SSTF)
SCAN / C-SCAN
LOOK / C-LOOK