Instruction Set Architecture ( ISA ) 1 / 28 instructions 2 / 28 - - PowerPoint PPT Presentation

instruction set architecture isa
SMART_READER_LITE
LIVE PREVIEW

Instruction Set Architecture ( ISA ) 1 / 28 instructions 2 / 28 - - PowerPoint PPT Presentation

Instruction Set Architecture ( ISA ) 1 / 28 instructions 2 / 28 Instruction Set Architecture Also called (computer) architecture Implementation --> actual realisation of ISA ISA can have multiple implementations ISA allows


slide-1
SLIDE 1

1 / 28

Instruction Set Architecture ( ISA )

slide-2
SLIDE 2

2 / 28

instructions

slide-3
SLIDE 3

3 / 28

Instruction Set Architecture

  • Also called (computer) architecture
  • Implementation --> actual realisation of ISA
  • ISA can have multiple implementations
  • ISA allows software to direct hardware
  • ISA defnes machine language
slide-4
SLIDE 4

4 / 28

ISA model

slide-5
SLIDE 5

5 / 28

ISA defnes...

  • Data types
  • Memory (registers et. al.)
  • Addressing modes
  • Instruction set
  • I/O
slide-6
SLIDE 6

6 / 28

What is an ISA?

  • x86 --> yes!

– Intel implements x86 – AMD implements x86 – Yet, both have diferent designs!!!

  • Therefore,

processors with diferent designs (microarchitectures) can share the same ISA

slide-7
SLIDE 7

7 / 28

Virtual Machines

  • Java Bytecode, anyone???

– Java programs are compiled to instruction

set specifc to the Java VM

– Java VM translates bytecode to machine

specifc machine code

  • Possible to implement one ISA one top of

another one using such techniques

slide-8
SLIDE 8

8 / 28

How to classify ISA?

  • Based on complexity

– Complex Instruction Set Computer (CISC) – Reduced Instruction Set Computer (RISC)

  • Parallelism / Word size

– VLIW (very long instruction word) – LIW (long instruction word) – EPIC (explicitly parallalel instruction

computing)

slide-9
SLIDE 9

9 / 28

CISC ( complex )

  • Single instruction can execute multiple
  • perations (low level --> I/O, ALU, mem)
  • CISC was defned after RISC was defned

– But CISC came before RISC (bizzaro!) – Everything that is not RISC... is CISC

slide-10
SLIDE 10

10 / 28

CISC ( complex )

Designed to implement programming constructs such as:

– Proceduce calls – Loops – Array access – Address lookups

... into a single instruction!!!

slide-11
SLIDE 11

11 / 28

CISC ( complex )

CISC is awesome..... But... There’s a catch... Sometimes less complex instructions performed better... Because programmers ‘overengineered’ (typical!)

slide-12
SLIDE 12

12 / 28

CISC

and the return of the Superscalar

  • Build superscalar implementations of CISC

directly (native support)

  • Advances in fast cache mediate frequent

memory accesses

  • Combine x86 instructions
  • E.g. Pentium Pro and AMD K5
  • Why didn’t it catch on???

... because everyone was using x86 RISC by then

slide-13
SLIDE 13

13 / 28

Why did we take RISC?

  • Reduced, as in, less complex than CISC
  • Requires lesser cycles to execute
  • Loose defnition of instructions

– simpler and smaller and general

  • Has more (reduced set? no?) instructions
slide-14
SLIDE 14

14 / 28

Stanford MIPS Experiment

  • Combine RISC with VLSI (very large scale

integration semiconductor technology)

  • 32-bit everything

– instruction, addressing (word-addressed)

  • Load/Store

– 32 general purpose registers

  • Optimising compilers!!!
slide-15
SLIDE 15

15 / 28

RISC

  • Fixed-length instructions (mostly 32bit)
  • Drawback? Code density.
  • ARM, MIPS, RISC-V

– short reduced instruction – instruction compression

  • ARM... is the processor in your phones!

You’re all carrying a RISC in your pockets!

slide-16
SLIDE 16

16 / 28

What architecture is my desktop/laptop CPU?

RISC? CISC?

slide-17
SLIDE 17

17 / 28

What architecture is my desktop/laptop CPU?

It implements the best of both worlds!!!

slide-18
SLIDE 18

18 / 28

Levels of parallelism

  • Thread
  • T

ask

  • Data
  • Memory
  • Software
slide-19
SLIDE 19

19 / 28

MPP

Massively Parallel Processing

  • Large number of processors
  • Simultaneously process
  • Can be diferent computers
  • e.g. Grid computing
  • MPPAs – massively parallel processing arrays
  • Used in supercomputers

(this is not cluster computing)

slide-20
SLIDE 20

20 / 28

Grid Computing

  • Distributed system
  • Non-interactive workloads
  • Each node (can) perform a diferent task
  • Nodes can be heterogenous
  • Nodes are not physically coupled
slide-21
SLIDE 21

21 / 28

GPU / GPGPU

  • General Purpose computing on Graphical

Processing Unit (GPGPU)

  • Use GPU instead of CPU
  • GPU is great at parallelisation
  • Use multiple GPUs in a pipeline formation
  • e.g. Nvidia CUDA
  • e.g. Metal (Apple), Vulkan
  • More later!!! (really later, in like, another lecture)
slide-22
SLIDE 22

22 / 28

Vector Processor

  • Instructions operate on vectors (1D) --> SIMD !!!
  • Scalar processors operate on one item
  • Awesome for numerical tasks
  • GPUs are kind of like vector processors
  • Intel x86

– MMX, SSE, AVX

  • We’ll learn about SSE soon.
slide-23
SLIDE 23

23 / 28

Gustafson’s & Amdahl’s Law

  • A task executed by a system whose resources

are improved compared to an initial similar system can be split into two parts:

– a part that does not beneft from the

improvement of the resources of the system;

– a part that benefts from the improvement

  • f the resources of the system.
slide-24
SLIDE 24

24 / 28

Gustafson’s Law

fxed execution time

slide-25
SLIDE 25

25 / 28

Amdahl’s Law

fxed workload

slide-26
SLIDE 26

26 / 28

Parallel Programming Languages

  • Actor model: Smalltalk, Erlang, Elixir
  • Co-ordination: LINDA
  • Datafow: Joule
  • Distributed: Julia
  • Event-driven: Verilog, VHDL
  • Functional: Haskell
  • Logic: Prolog
slide-27
SLIDE 27

27 / 28

Parallel Programming Languages

  • Multi-threaded: C, C++, Java
  • Object-oriented: C#, Java, Smalltalk
  • Message passing: Rust
  • Frameworks

– Apache Hadoop, Apache Spark, CUDA, – OpenCL, OpenMP

slide-28
SLIDE 28

28 / 28

Let’s discuss the assignment!!! The assignment is simple. Implement 1 searching algorithm and 1 sorting algorithm in non-parallel and parallel execution formats, and compare them. Write a report on your findings. Submission date: FRIDAY 23:59 16 March 2018 UTC. How to submit: blackboard, upload as many times as you want