Lectures 7 - 10 Flashcards
What do threads provide?
A separate thread of execution
Where and when do threads work?
They operate concurrently within the processor
What functions do threads operate on?
They operate on small individual functions which are a subset of a larger process.
What are some of the functions that the OS has in order to deal with multi tasking
- Interrupts
- Pipelining
- Superscalers
- Simultaneous Multi Threading (SMT)
- Symmetric and chip level multi threading (SMP/CMP)
- Direct memory access
- Graphics Processing Units (GPU’s)
What do interrupts ‘tell’ the CPU?
That something of higher importance has happened
What are the steps taken by the CPU when an interrupt is detected?
1: The event causes an interrupt request (IRQ)
2: A signal is sent to the processor through a reserved line
3: The processor saves its current state and loads the interrupt handler for that interrupt
4: Once the interrupt has been handled, the processor returns to its original task.
What is pipelining?
When a process is broken down into a small series of steps, with which different circuitry does different parts
What does pipelining allow?
It allows an instruction to be fetched while two others are being decoded and executed at the same time
What happens in pipelining when a condition is encountered?
A likely outcome is selected so that it can be ready to be processed. However, if the unlikely outcome happens then the likely outcome will have to be wiped from memory.
What is superscaling?
When a CPU uses its idle execution units (e.g. ALU) to complete more than one instruction per clock cycle
What are superscalers often used in conjunction with?
Pipelines
Why are superscalers often used with pipelines?
As it allows multiple instructions to be processed per pipeline instruction
What three things does a computer need to know to access data on a HDD?
What cylinder it is on
Which head is currently in use
Which sector it is in
What do sectors contain?
They contain (in order):
- A header
- Gap
- Data
- ECC
- Gap
What does the header contain in a sector?
Contains addresses and error checking info
What are the gaps for?
To allow the head to change operation
What is the ECC?
Error Checking Code
What does LBA stand for?
Logical Block Addressing
What is the point of LBA?
It is how the OS knows where things are in a HDD (or other secondary storage device)
What is the formula for LBA?
((C x HPC) + H) x SPT + (S-1) Where: C = Cylinder H = Head S = Sector Number HPC = Heads per cylinder SPT = Sectors per Track
What does RAID stand for?
Redundant Array of Independent Disks
What is RAID?
It is a technique where data is split across multiple disks to improve reliability of a system
What does RAID 0 do?
It strips the data: It spreads the data between all of the allocated disks.
What does RAID 1 do?
It makes multiple disks contain the same data so that if one breaks then the data is still secure
What does RAID 5 do?
It distributed the data across multiple disks along with their parity, meaning that if one of the disks were to fail then the other levels of data are not lost.