P2 T2 L10 - Processor performance and programming languages Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the factors affecting processor performance?

6 factors

A
  1. multiple cores
  2. cache memory
  3. clock speed
  4. word length
  5. address bus width
  6. data bus width
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do multiple cores affect processor performance?

2 points

A
  1. The ‘cores’ enable instructions to be fetched and executed.
  2. More cores means more instructions can be fetched and executed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Most computer systems have _ processor(s), to speed up processing you could use _____ _____ __.

A

1

more than 1

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

For convenience multiple processors can be incorporated into 1 chip known as a _____-_____ processor.

A

multi-core

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

How does cache affect processor performance?

2 points

A
  1. The cache speeds up processing by storing frequently used data or instructions in its high-speed temporary memory.
  2. More cache means more instructions/data can be stored in this high speed memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is clock speed? (1 point) and how does clock speed affect performance? (1 point)

A
  1. Clock speed indicates how fast each instruction will be executed.
  2. If you increase the clock speed you increase the speed at which the processor executes instructions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is word length?

1 point

A
  1. A word is a collection of bits that can be addressed and manipulated as a single unit.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

If a system has a word length of 32 bits it indicates that 32 bits of data can be handled in each clock pulse, increasing this to 64 bits doubles the amount of ____ that can be handed at one time.

A

bits

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

Word length and bus width are closely linked as a 64 bit system needs ___ ___ ______.

A

64 bit buses.

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

What is bus width?

1 point

A
  1. the number of bits that can be sent down a bus in one go
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Increasing the ________ _____ ________ increases the amount of memory which can be ________, meaning more ______ can be installed and utilised on the computer.

A

address bus width

addressed

memory

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

Increasing the ______ _____ _______ means more bits can be sent in each clock pulse, meaning more ______ can be processed within a given time frame.

A

data bus width

data

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

Give 3 factors that could affect the performance of your PC as a whole

A
  1. USB port speeds
  2. RAM
  3. Graphics card
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Name 2 low level programming languages

A
  1. Machine code

2. Assembly code

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

(Machine code)

All instructions given to the computer must be in _____

As everything entered as ____ there is a high risks of making a mistake

____er to track down errors in the coding

Programs can be used directly by the processor so _______very quickly

Processor will do exactly what you want it to do

A

binary

bits

harder

execute

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

(Assembly code)

Write using ______

Assembly code is essentially machine code with ____

Number of _____ you can use is generally small

Each command translates directly into ______ machine code command

Needs to be converted into machine code with an _________

A

words (small strings)

words

words (instruction sets)

one

assembler

17
Q

Give 3 ADVANTAGES of machine-code and assembly language programming compared with high-level language programming

A
  1. Can be executed quickly
  2. Program code is relatively compact
  3. Allows direct manipulation of registers on the processor, giving you more control
18
Q

Give 3 DISADVANTAGES of machine-code and assembly language programming compared with high-level language programming

A
  1. High risks of making a mistake
  2. Harder to track down errors
  3. Can be harder to code in
19
Q

Give 3 types of high level programming languages

A
  1. Imperative/procedural
  2. Declarative
  3. Object oriented
20
Q

Imperative/procedural high level language, describe it. (4 things about it)

A
  1. You tell the computer exactly what to do, instruction by instruction
  2. Uses a series of commands to describe how a problem should be solved
  3. A program is built from one or more procedures (also known assubroutinesorfunctions)
  4. Uses variables, sequence, selection, iteration (FOR, WHILE, REPEAT), procedures
21
Q

Declarative high level language, describe it. (3 things about it)

A
  1. Uses a series of facts and rules in a knowledge base
  2. The ‘program’ is an Inference Engine, which can backtrack, looks for a goal in the knowledge base
  3. Programmer states a problem but does not describe how the problem is solved
22
Q

Object oriented high level language, describe it. (4 things about it)

A
  1. It is a modular approach (using objects like in Java)
  2. It is an attempt to simulate the real world by means of objects that have characteristics and functions
  3. Each object has its own methods (functions and procedures)
  4. Objects can inherit methods from other objects
23
Q

(Low level language)

Assembly language code needs to be converted to machine code, this is carried out by an _________.

The ________ converts the _______ code to ______ code.

Based on one processor type so generally ___ portable

A

assembler

assembler

source

object

not

24
Q

(High level language)

Two types of translator used, either a _______ or a _________.

Translators read a statement of code and immediately perform the action (may be line by line or one routine at a time)

Compilers convert the whole _______ code to _______ code before the program is executed

A

compiler interpreter

source object

25
Q

(High level)

_______ – you can use the code on other machines

Can be ____ to compile if it is a large program

____ to check for errors

______ to code larger programs in

A

Portable

Slow

Easy

Easier

26
Q

(Low level)

_________– usually written for a specific processor so can’t run it on other machines without mass errors

Very ______ to execute

_____ to check for errors

______ to write/more likely to make errors

A

Non-portable

quick

hard

harder