TDTS10

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/68

encourage image

There's no tags or description

Looks like no tags are added yet.

69 Terms

1
New cards

Main components of a computer system.

CPU

Main memory

2
New cards

von Neumann architecture.

Main components: arithmetics unit, memory unit, control unit and input/output unit.

Same memory for data and instructions

Calculations are run sequentially.

Simple and economic.

3
New cards

Instruction execution cycle (machine cycle).

1. Fetch instruction

2. Decode instruction

3. Fetch data

4. Execute instruction

4
New cards

Fetch instruction.

Fetches the instruction located in the address, given by program counter, from memory.

Loads instruction into instruction register.

5
New cards

Decode instruction.

The instruction is decoded in the instruction register.

6
New cards

Fetch data.

Data required for completing the instruction is fetched from memory or registers and put in to data registers.

7
New cards

Execute instruction.

Data is passed to ALU for calculations and logical operations. Result is the loaded into registers or main memory.

8
New cards

Main components of a CPU.

Control unit.

Arithmetic logic unit (ALU).

Registers.

9
New cards

Control unit.

Manages the operation of the entire computer by fetching instructions from memory, interpreting them and commanding appropriate hardware to act on those instructions.

10
New cards

Arithmetic logic unit (ALU).

The part of the CPU that preforms the actual logical and mathematical computations such as addition, subtraction, multiplication, division and comparisons.

11
New cards

Registers.

Very small but fast memories that can hold only the information a processor needs on hand at a given time.

By using registers the CPU can get provided with data far faster than if the processor would retrieve data only from external memory sources.

12
New cards

Instruction registers (IR).

Holds the instruction that is currently being executed or decoded.

13
New cards

Program counter (PC) or instruction address register.

Holds the adress in the memory where the next instruction is located.

14
New cards

Accumulator register (AR).

Stores intermediate arithmetic and logic results. Without it the results of a computation would have to be written back to main memory immediately upon completion, perhaps only to be read right back again for use in the next operation.

15
New cards

General purpose registers.

Stores both data and addresses for very small periods of time.

16
New cards

MIPS

Millions of instructions per second.

17
New cards

FLOPS

Floating-point operations per second.

18
New cards

Moore's law

A prediction of how many transistors a chip can hold.

An exponential increase: The number of transistors double every 24 months.

19
New cards

Main memory.

Directly accessible by the CPU.

Data and programs, or parts of programs, are read into the main memory (RAM) from external memory devices.

20
New cards

Memory - computer speed relation

A memory access is a slow process in comparison to other operations.

The larger the memory, the slower memory access.

21
New cards

Memory bandwidth.

The rate at which data can be read from or stored into a memory by a processor.

Memory bandwidth = amount of data per access / memory cycle time

22
New cards

Increasing bandwidth.

Increase amount of data per access (expensive and limits memory size).

Divide memory into separate banks, each with its own control unit. Thus reducing memory cycle time (due to smaller memories).

23
New cards

Interleaving placement of program and data.

Spreading data and instructions evenly across all memory banks.

24
New cards

Semiconductor main memory

Mostly random access memories (RAM).

Information is lost without power (volatile).

Relatively cheap and has low power consumption.

25
New cards

Sequencial access

For accessing a certain address, all addresses prior to that on must be went through.

26
New cards

Direct access

Same as random access.

Accesses any address instantly.

27
New cards

Random access

Same as direct access.

Accesses any address instantly.

28
New cards

Associative memory

RAM memory where data is fetched based on its content rather than its address.

Compares a given bits with all memory slots simultaneously.

29
New cards

ROM

Read only memory.

Usually very fast.

Can be used as primary memory for certain instructions. For example on startup where the same procedures always are made.

30
New cards

Seek time

The time for the disk to reach necessary rotation speed and to position the read/write head to proper location.

31
New cards

Read/write time

1 / data transfer rate

32
New cards

Rotational delay

The time required for the read/write head to position at the beginning of the sectors where data are stored

33
New cards

Average access time for combined cache memory.

The average time for fetching data or an instruction from memory.

P(hit) cache access time + (1 - P(hit)) memory access time + cache access time * block size + cache check time

34
New cards

Cache memory

Small, fast memory for accessing recently accessed data or instructions.

35
New cards

Cache block size (line size).

Number of words in a block.

36
New cards

Cache miss

When CPU wants to access an item not in the cache memory.

Retrieves data from main memory and stores a copy in the cache memory.

37
New cards

Harvard architecture

Separate memory for data and instructions.

Makes it possible to fetch instructions and to read/write data at the same time.

Generally faster than von Neumann architecture.

38
New cards

Locality of reference

If a data is accessed the same data or related data is likely to be accessed in a near future.

Temporal locality.

Spatial locality

39
New cards

Temporal locality

If a particular memory location is referenced, then it is likely that the same location will be referenced again in the near future.

40
New cards

Spatial locality

If a particular storage location is referenced at a particular time, then it is likely that nearby memory locations will be referenced in the near future.

41
New cards

Unified cache

Data and instructions are stored in the same cache. (von Neumann architecture)

42
New cards

Cache mapping functions.

Direct mapping (one-way set associative map)

Two-way set associative map

n-way set associative map

Fully associative map

43
New cards

Direct mapping (one-way set associative map)

Each location in main memory can go into only one entry in the cache.

44
New cards

Two-way set associative map

Each location in main memory can go into two entries in the cache.

45
New cards

n-way set associative map

Each location in main memory can go into n entries in the cache.

46
New cards

Fully associative map

Each location in main memory can go into every entries in the cache.

Best miss rate but only practical for small numbers of entries.

47
New cards

Offset

The least significant bits in an address that refers to a specific place in a block of a cache memory.

48
New cards

Set/index

The bits in an address that refers to a specific set in cache memory.

49
New cards

Tag

The most significant bits in an address that refers to a block in a set of a cache memory.

50
New cards

Cache replacement algorithms

Decides which block should removed when cache is full.

LRU (Least recently used)

FIFO (First in first out)

LFU (Least frequently used)

Random

51
New cards

Cache write policies

Write-through

Write-back

52
New cards

Write-through

Write is done synchronously both to the cache and to the backing store.

53
New cards

Write-back

Initially, writing is done only to the cache. The write to the backing store is postponed until the modified content is about to be replaced by another cache block.

54
New cards

Virtual memory

By using virtual memory a program running can use its own addresses (virtual addresses) which are mapped into physical addresses in RAM.

55
New cards

Virtual to physical address

The addresses of a program are split up into pages (generally 4kB each). These are mapped into equally large pages in the physical memory. A given virtual address is split up into two pieces:

Page offset

Virtual page address

56
New cards

Page offset

The least significant bits of the virtual address that tells where in a page a given address is.

(12 bits, given a page size of 4kB)

57
New cards

Virtual page address

The bits of the virtual address telling which page a virtual address is located in.

Is mapped into a physical page address.

58
New cards

Page fault

When a page requested is not to be found in the RAM. The OS fetches the page from hard drive and is then loaded into the RAM and mapped for usage by the requesting program.

59
New cards

Instruction set

Describes which assets are available for programming of a processor.

60
New cards

Common instruction set design issues

Which operations to provide?

What datatypes?

Instruction format: Number of addresses and size of fields etc.

Number of CPU registers and their use.

61
New cards

Direct addressing

The operand address is directly given at the address field of the instruction.

62
New cards

Immediate addressing

The operand is given in the instruction.

63
New cards

Indirect addressing

The memory location pointed by the address in the instruction contains the address of the operand, instead of the operand itself.

64
New cards

Indexed addressing

The operand address is given by adding the address given in the instruction and an index stored in a register.

65
New cards

Relative addressing

The address is relative to a base address stored in a register.

66
New cards

Pipeline hazards

Situations that prevent the next instruction in the instruction stream from executing during its designated clock cycle.

Structural hazards

Data hazards

Control hazards

67
New cards

Structural hazards

Caused by memory conflicts.

Results in a 1 cycle penalty (performance lost is multiplied by the number of stages).

68
New cards

Data hazards

Caused by read/write conflicts.

Emerges when a data which is not yet calculated is needed.

69
New cards

Control hazards

Caused by branch instructions, which change the instruction execution order.