Hardware and Virtual Machines
Processor design choices, parallel processing, and running one computer inside another.
- Click the stages below in the order they happen.
//RISC vs CISC
RISC has few, simple, fixed-length instructions that mostly take one cycle — which makes pipelining easy and power use low, so it dominates phones. CISC has many complex instructions that can take several cycles; programs are shorter but the hardware is complicated and harder to pipeline.
//Pipelining
Instead of finishing one instruction before starting the next, the stages overlap — while instruction 1 is being executed, instruction 2 is being decoded and instruction 3 fetched. Throughput rises sharply. A branch can force the pipeline to be flushed, which is the cost.
cycle1 cycle2 cycle3 cycle4
instr 1 fetch decode execute
instr 2 fetch decode execute
instr 3 fetch decode//Flynn's four classifications
SISD: one instruction, one data stream — a simple single-core machine. SIMD: one instruction applied to many data items at once — graphics and vector work. MISD: several instructions on one data stream — rare, used where results must be cross-checked. MIMD: independent instructions on independent data — multi-core computers.
//Virtual machines
Software that behaves like a separate computer. Benefits: run another operating system, test software safely in isolation, run legacy software, and use one physical server for several logical ones. Drawbacks: it runs more slowly than real hardware and uses extra memory.
CHECK YOURSELF
1.Why is RISC easier to pipeline than CISC?
2.One instruction applied to many data items at once is which classification?
3.What is a genuine drawback of running software in a virtual machine?