1.2? Flashcards

(22 cards)

1
Q

What is pipelining

A

Process of completing the fetch decide and execute cycle of three separate instructions separately, holding appropriate data in a buffer in close proximity to the CPU until its required

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

What is the aim of pipelining

A

Reduce the amount of time the CPU is kept idle

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

What is instruction pipelining

A

Separating out the instruction into fetching, decoding and executing

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

What is arithmetic pipelining

A

Breaking down the arithmetic operations and overlapping them as they are performed

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

What is a GPU

A

Graphics processing unit
Works with the CPU to increase the throughput of data and the number of concurrent calculations with an application
Co processor

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

Difference between a CPU and a GPU

A

GPUs have a massive parallel architecture
GPUs consists of thousands of smaller more efficient core designed for handling multiple tasks simultaneously
CPU consists of fewer cores and coordinates a wide range of tasks

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

Describe some real world uses for a GPU

A

Graphic design
CAD/CAM
CGI
Cryptography
Data science
AI and machine learning

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

What are the stages of compilation

A

Lexical analysis
Syntactic analysis
Code generation

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

What is each parse in the stages of compilation designed for

A

Designed to carry out tasks and prepare the code for the next parse

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

What tasks happen in lexical analysis

A

Uses a lexer to read source code character by character
Unneeded spaces removed
Comments removed
Symbol table made

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

What is a symbol table (stages of compilation)

A

Code is analysed with keywords, names of variables and constants.
These are replaced with tokens and information about the token, which is stored

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

What tasks happen in syntax analysis

A

Tokens received
Checks for correct syntax and flags errors (incomplete brackets and undeclared variables)
Semantic analysis to detect logic mistakes
Creates abstract syntax tree

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

What is an abstract syntax tree

A

Representation of the source code in the form of a tree that uses post order traversal

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

What happens in code generation

A

Final action of the compiler
Result of previous stages is stored as an object file
Variables and constants are allocated memory

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

What is code optimisation

A

Attempt to reduce execution time of the object program
Redundant parts of the code are detected and removed
Repeated sections of the code may be grouped together and replaced with more efficient code
Can increase compilation time and produce unexpected results
Leg) speed optimisation and memory optimisation

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

What is a library?

A

Ready compiled and tested programs that can be run when needed. They can be incorporated with static or dynamic links.

17
Q

What are advantages of libraries

A

Easy to implement
Pre tested
Pre compiled and therefore optimised
Prevent programmers having to code commonly used functions

18
Q

What are disadvantages of libraries

A

Making specific tweaks can be difficult or impossible
Trust developers will maintain them
Outputs may not match outputs you want

19
Q

What is a loader

A

Part of the Os
Load executable program file into memory
Loads required libraries in dynamic linking
When a file is executed the loader retrieves the library or subroutine from the memory location

20
Q

What are linkers

A

Piece of software responsible for linking external modules and libraries included within the code
Put an appropriate machine address in the external call and return instructions
Created a final executable file that contains all the source code

21
Q

What is static linking

A

Library code is included directly to the machine code to create the executable file (large file size)

22
Q

What is dynamic linking

A

Compiled version of libraries stored on host computer
Os links required code from library as program is running
If libraries change referencing should change
Addresses of modules and libraries are included
No need to rewrite code