Chapter 15 Flashcards

"Hardware and Virtual Machines"

1
Q

RISC (reduced instruction set computer)

A

assembly code is broken into a number of single cycle instructions

  • fewer, simpler instructions
  • few instruction formats
    • fewer addressing modes
  • single-cycle instructions
  • fixed-length instructions
    • easier to pipleine
  • fewer addressing modes
  • many registers (general purpose)
  • hardwired CU
  • more emphasis on software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

CISC (complex instruction set computer)

A

aims to carry out a given task in as few lines of code possible

  • more complex instructions
  • many instruction formats
  • multicycle instructions
  • variable length instructions
  • more addressing modes
  • fewer registers (most processing is done in memory)
  • microprogrammed control unit
  • pipelining is more difficult (variable length)
  • emphasis on hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

hardwired control unit

A

uses logic circuits, e.g. flip flops

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

microprogrammed control unit

A

uses programs, code will compile, run and generate output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is pipelining?

A
  • allows several instructions to be processed simultaneously
  • therefore increasing the number of instructions completed per unit time
  • each stage of instruction is completed during one clock cycle
  • when the first stage of an instruction is completed the first stage of the next instruction can start executing
  • another instruction can start executing before the previous one is finished
  • processing several instructions can be done simultaneously
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

pipelining during the fetch-execute cycle in RISC processors

A
  1. Instructions are divided into subtasks / 5 stages
  2. … Instruction fetch / IF, Instruction decode / ID, operand fetch / OF, opcode/instruction execute IE, result store / write back result / WB
  3. Each subtask is completed during one clock cycle
  4. No two instructions can execute their same stage at the same clock cycle
  5. The second instruction begins in the second clock cycle, while the first instruction has moved on to its second subtask.
  6. The third instruction begins in the third clock cycle while the first and second instructions move on to their second and third subtasks, respectively, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

interrupt handling with pipelining

A

when an interrupt occurs:
option 1: erase the pipeline
option 2: construct individual units in processor with individual program counters. this allows current data to be stored for all instructions in pipeline while interrupt is handled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

SISD

A

single instruction single data
processor executes one set of instructions on one data set
only one processor

commonly used among early personal computers
no ability for parallel processing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

SIMD

A

single instruction multiple data
- many processors execute the same instruction using different data sets
- has several ALUs
- each ALU executes the same instruction on different data sets at the same time

used in sound sampling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

MISD

A

multiple instruction single data
several processors
* many processors execute different instructions on the same data set at the same time

not commercially used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

MIMD

A

multiple instruction multiple data
* several processors
* many processors executing different instructions on different data sets

used in most modern personal systems
uses parallel processing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

massively parallel computers

A
  • large number of processors, usually within the same computer
  • working collaboratively and simultaneously on the same program
  • communicating via message interface
  • network infrastructure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

hardware issue in massively parallel computers and cluster computing (they are not the same though)

A
  • processors need to be able to communicate
  • so that processed data can be transferred
  • from one processor to another
  • so it’s a very challenging topology
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

software issue in massively parallel computers

A

appropriate programming language should be used
which allows data to be processed by multiple processors simultaneously

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

cluster computing

A

large number of computers/PCs are linked/networked together.

each computer’s processor forms part of a larger pseudo-parallel system, acting as a supercomputer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

characteristics of massively parallel computers

A
  • large number of processors
  • collaborative and simultaneous processing
  • network infrastructure
  • communicate by sending messages
17
Q

virtual machines

A

software that emulates a different computer system
allows the guest OS to operate on the computer’s hardware through the host OS

  • use of software to implement a hardware set-up emulating another machine.
  • a process would interact with a software interface provided by the operating system.
  • kernel of VM OS interacts with host hardware.
  • software interface provides an exact copy of hardware.
18
Q

tasks of a virtual machine

A
  • creates and manages VM (file retrieval, allow user to interact),
  • hardware emulation - existing hardware is made available to guest OS
  • protect VM from the actions of another
19
Q

requesting a file using a virtual machine

A
  1. process sends request to VM operating system
  2. guest OS handles request as if it were running on its own physical machine (not aware).
  3. the I/O request is translated by the VM software, instructions are executed by host OS.
  4. host os retrieves data from file and gives it to the vm software.
  5. vm software passes the data to the guest OS and guest OS passes data to the application
20
Q

role of virtual machine software in the testing of an app

A
  • can create and manage a virtual machine
  • translate instructions used by guest OS to what is required by host OS
  • emulates hardware
  • protects each VM so instances of the app can be tested together
21
Q

applications of a virtual machine

A

software development
allow running of legacy applications

22
Q

advantages of a virtual machine

A
  • a virtual machine can crash without affecting the host machine
  • provides protection to host OS and software from malfunction and viruses
  • different instruction set architectures can be emulated on a single computer
  • cost savings due to not needing to purchase extra hardware
  • multiple VMs can be used on the same computer
  • can run legacy applications
  • not always in mark scheme/applicable - useful to programmers in development to test software/code.
23
Q

disadvantages of a virtual machine

A
  • costly and complex to implement and manage
  • VM has poorer performance due to extra load on the host computer.
  • performance of the guest system cannot be adequately measured
  • VM may be affected by any weaknesses of the host machine
  • not possible to emulate some hardware
24
Q

half adder

A

fundamental operation in computing binary addition.
two inputs and two outputs:
sum = A XOR B
carry = A AND B

25
Q

limitations of a half-adder

A

can only add two bits
can’t deal with carries from previous additions
doesn’t represent overflows

26
Q

full adder

A

contains two half-adders to incorporate carries (previous outputs) from previous additions
* has three inputs - A, B, and Cin
* two outputs, sum and Cout
* sum = (A XOR B) XOR Cin
* carry = (A AND B) OR ((A XOR B) AND Cin)

27
Q

flip flop

A
  • ⬇️used for data and memory storage.
  • purpose is to store a single bit
  • hardware component
  • logic circuit with two stable states
  • the data can be changed by applying varying input
  • two examples: SR and JK
28
Q

SR

A

input: S and R
output: Q and Q’ (Q complement)

can be constructed with two NAND gates or two NOR gates
the SR flip-flop can be used as storage for one bit, as a value is stored but can be altered

29
Q

problems with the SR circuit

A

invalid state: when both inputs are 1 (when using NOR, NAND is when both are 0) both output states are 0, which is invalid as they are complementary. unstable state
uncertain state: inputs may not arrive at the same time

30
Q

JK

A

inputs: J and K
outputs: Q and Q’

the JK is a gated version of the SR that introduces a third clock pulse input and does not allow Q and Q’ to have the same value for any combination of inputs
* clock is used to synchronise inputs and avoid an uncertain state
* created to combat the problems of SR

31
Q

use of JK flip flop

A

several JK flip flops can be used to make shift registers in a computer
simple binary trees link several JK flip flops

32
Q

boolean algebra laws

A

A.B = A AND B
A + B = A OR B
(A.B)’ = A’ + B’ (and vice versa swapping full stop and plus)
A.(B+C) = A.B + A.C

33
Q

k-maps

A

a method of creating a boolean algebra expression from a truth table.
common method is the sum-of-products :
* find every 1 output,
* then change the row so each input is one (e.g. A = 0 to A’ = 1),
* AND the row together,
* finally OR all the 1 outputs

mapping of bits:
* circle the largest group of 2, 4, or 8 bits on the table. overlapping is allowed, and “wrapping” of the table.
* when writing the expression from the table, add the unchanging factor(s) from each group

34
Q

gray code

A

that every row and column’s bit label only changes by one bit each time. e.g. 00 -> 01, not 00 -> 11
* provides a system so the mapping of bits is reliable

35
Q

benefit of kmap

A

provide a visual way of simplifying boolean expressions

36
Q

combinational circuit

A

output is dependent only on the input values
circuit that is time-independent

37
Q

sequential circuits

A

output depends on the current input and previous output
sequential circuits depend on clock cycles.
an example is the SR flip-flop