Chapter 15.1: Processors, Parallel Processing and Virtual Machines

RISC & CISC

RISC - reduced instruction set computer

CISC - complex instruction set computer

Differences between RISC and CISC

CISC RISC
Many instruction formats are possible Uses fewer instruction formats
There are more addressing modes Uses fewer addressing modes
Makes use of multi-cycle instructions Makes use of single-cycle instructions
Instructions can be of a variable length Instructions are of a fixed length
Longer execution time for instructions Shorter execution time for instructions
Multiple register sets Makes use of general multipurpose registers // fewer registers
It is more difficult to make pipelining work Easier to make pipelining function correctly
The design emphasis is on the hardware The design emphasis is one the software
Uses the memory unit to allow complex instructions to be carried out Processor chips require fewer transistors
Has a programmable control unit Has hard-wired control unit
Make more use of cache and less use of RAM Make more use of RAM

Interrupt handling in pipelining

  • Once the processor detects the existence of an interrupt
  • To discard all instructions in the pipelining except for the last instruction in the writeback stage

Past-paper questions




Pipelining & Registers

Allow several instructions to be processed simultaneously without having to wait for the previous instructions to be completed

  1. Instruction Fetch cycle (IF)
  2. Instruction Decode cycle (ID)
  3. Operand Fetch cycle (OF)
  4. Instruction Execution cycle (IE)
  5. Writeback Result process (WB)

Explain what is meant by pipelining:

  • Pipelining is instruction level parallelism
  • Execution of an instruction is split into a number of stages
  • When the first stage for an instruction is completed, the first stage of next instruction can start executing
  • Another instruction can start executing before the previous one is finished
  • Processing a number of instructions can be concurrent/simultaneous

Basic computer architectures

SISD

  • There is only one processor
  • The processor executes one sets of instructions on one sets of data

SIMD

  • The processor has several ALUs // several processors
  • Each ALU executes the same set of instructions on different sets of data at the same time

MISD

  • There are several processors
  • Each processor executes different set of instruction on the same set of data at the same time

MIMD

  • There are several processors
  • Each processor execute different set of instruction
  • Each processor operate on different set of data

Past-paper questions


Massively parallel computers

Describe what is meant by a massively paralleled computer

  • Large number of processors
  • … Working collaboratively on the same program
  • … Working together simultaneously on the same program
  • … Communicating via a message interface

Properties

  • A large number of processors
  • Collaborative processing // coordinated simultaneous processing
  • Network infrastructure
  • Communicating using message interface
  • It is a much faster way to handle large volumes of independent data
  • The data used sometimes relies on result of previous operation, therefore such data cannot be handled in parallel
  • Datasets require the same processing for it to work
  • It overcomes the Von Neumann bottleneck and therefore greatly improves CPU performance
  • Parallel processing requires more expensive hardware

Past-paper Questions

Changes needed for codes in order to run on massively paralleled computer

  • Split into blocks of code
  • … that can be processed simultaneously
  • … instead of sequentially
  • Each block is processed by a different processor
  • Which allows each of many processors to process the different blocks of code independently
  • Requires both parallelism and coordination

Explain one of the hardware issues that will be overcome if a massively parallel computer is to function correctly

  • Communication between processors is the issue
  • Each processor needs a link to other processors
  • Many processors require many of these links
  • Challenging topology

A computer has a single processor that contains four processing units.
Explain why this is not an example of a massively paralleled computer:

  • Only one separate processor
  • Quad core computer system // processing unit shares the same bus

Identify different types of parallelism

  • Instruction
  • Processor
  • Memory usage
  • Computer System

Virtual machine

An emulation of an existing computer/program/operating system. A computer OS running with another computer’s OS.

Using a software to implement a hardware setup

Host OS

  • The operating system that is actually controlling the physical hardware
  • The operating system for the physical hardware
  • Guest OS is running under the host OS

Guest OS

  • An operating system running in the virtual machine
  • Controls virtual hardware
  • OS being emulated

Hypervisor

Virtual machine software that creates and runs virtual machine

  • Software, not hardware
  • Creates/deletes/manages virtual machine
  • Translates the instruction used by the guest operating system to that required by the host operating system
  • Hardware emulation
  • Protects each virtual machine
    • So instances can be tested together

Benefits

  • Multiple operating systems can exist simultaneously
  • … allow for testing using the same hardware
  • Only one set of hardware required
  • … reduces cost of producing the app
  • No need to set up more than one computer
  • --
  • Software can be tried on different OS using the same hardware
  • No need to purchase all sorts of different software
  • Easier to recover if the system issue causes the system to crash
  • VM provides protection to other software
  • --
  • No need to acquire client hardware for testing
  • Reduce set-up time for test system
  • Common development system for all developers
  • --
  • They allow modern systems to use programs that run on obsolete or unsupported platform^1
  • They allow platform independent program to run on multiple platforms
  • They allow one computer to behave as several computers simultaneously
  • They can be easily backed up, copied, and reinstalled.

Limitations

  • Time and effort required for implementation
  • Implementation would not offer the same level of performance that would be obtained in a normal system
  • Expensive, complex to manage and maintain
  • Execution of extra code, processing time increased
    • So cannot accurately test speed for real performance
    • Performance is degraded
  • May not be able to emulate some hardware
    • So that the hardware cannot be tested using virtual machine
  • --
  • Virtual machine may not be able to emulate some hardware
  • Virtual machine cannot directly access some hardware
  • Using virtual machine means execution of extra code // processing time increased
  • A virtual machine might not be as efficient // performance degraded
  • Using a virtual machine increases the maintenance overheads

Role of virtual machine software

  1. Create/delete virtual machines
  2. translate instruction used by the guest operating system to that required by the host operating system
  3. Existing hardware made available to guest OS // hardware emulation
  4. Ensure each virtual machine is protected from actions from other virtual machines

Past-paper questions

A virtual machine is a software/program that emulate a physical/different computer system; A virtual machine allow multiple guest operating system to run on one computer using host operating system

Describe what happens after the guest operating system has received the data request from the application:

  • Guest OS handles the request as if it were running on its own physical machine
  • Guest OS handles the request as usual
  • I/O requests are translated by the virtual machine software
  • Into instruction executable by the host OS
  • Host OS retrieves the data from the file
  • Host OS passes the data into virtual machine software
  • The virtual machine passes the data to the guest OS
  • Guest OS passes the data to the application