Week 12 Flashcards
3 main functions of IO Driver:
Initialize Device
Manipulates device’s CSRs to start operations when I/O is needed
Handles interupts from devices
What are the 2 type of IO devices?
Character Oriented: Keyboard, Mouse (Transfer one byte at a time)
Block-oriented: Disk, network interface (Transfer block of data at a time)
What are the 3 parts of a device driver?
Lower Half, Upper half, shared variables
Lower Half:
Handler code that is invoked when the device interrupts, communicates directly with device
Upper half:
Set of functions that are invoked by applications, allows application to request I/O operations
shared variables
used by both halves to coordinate, contains input and output buffers
_____ is needed because interrupts occur asynchronously and multiple applications can attempt I/O on a given device at the same time
mutual exclusion: This guarantees only one operation will be performed at any time
what is pipelining?
pipelining is when you execute multiple instructions at once in order to speed up the overall program (think laundry example)
What is instruction-level parallelism?
parallelism that exists in machine programs
what are the 3 hazards of pipelining?
Structural hazard: isufficient hardware exists for parallelism
data hazard: instruction depends on earlier result; pipelining overlap of instructions exposes this dependence
control hazard: caused by branches and instructions that change the PC away from Default_next_instruction
what is dependece?
A program property whereby a sequential relationship exists between instructions because of the requirement for program correctness, limits ILP
data dependece exists when:
a result is used (later) as an operand; such dependence is inherent to the algorithm used
true data dependence:
a result is used later as an operand, a value flows from one instruction to an instruction appearing later in the program listing
name dependence:
occurs when two instructions use the same storage location, called a name, but no value flows from the first instruction to the subsequent one
antidepence from J to K
occurs when J reads from the name and K writes to the name