Intro to Computer Systems Final

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

1/96

flashcard set

Earn XP

Description and Tags

Intro to Computer Systems notes generated from textbook

Last updated 8:34 AM on 12/12/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

97 Terms

1
New cards

What is the principle of locality?

The principle of locality is a key concept that enables effective use of a memory hierarchy. It reflects the tendency for programs to access memory locations non-uniformly, with clusters of frequently accessed locations that change slowly over time.

2
New cards

What are the two main types of locality?

Temporal locality: Recently referenced items are likely to be referenced again in the near future. Spatial locality: Items with nearby addresses to a recently referenced item are likely to be referenced soon.

3
New cards

What does temporal locality result from?

Temporal locality arises from common program features like looping constructs, temporary variables, stacks, and frequently called subroutines. These cause the same data locations to be accessed repeatedly over a short period of time.

4
New cards

What does spatial locality reflect?

Spatial locality reflects the tendency for programs to access instructions sequentially and access data items stored close together, such as elements of an array or fields of a record. Nearby memory locations are likely to be referenced close together in time.

5
New cards

How do locality properties enable the memory hierarchy to improve performance?

Locality allows the memory hierarchy to store frequently accessed instructions and data in smaller, faster memories closer to the processor (like caches). This reduces the overall access time compared to always accessing slower main memory.

6
New cards

What observation did Denning make about locality based on memory references?

Denning observed that locality is based on the assertion that memory references made in the near future are likely to be to locations that were recently referenced or locations near recently referenced items.

7
New cards

What are the main characteristics used to categorize memory systems?

Computer memory systems can be categorized according to several key characteristics: Location (internal vs external), Capacity, Unit of transfer, Access method, Performance metrics, Physical type, Physical characteristics.

8
New cards

What is the difference between internal and external memory?

Internal memory is located within the processor or very close to it (like registers, cache, and main memory). External memory is located further and accessed via I/O controllers (like SSDs, HDDs, etc.).

9
New cards

What units are used to measure memory capacity?

Memory capacity is usually measured in bytes (B) or words. For example, a memory chip might store 4 GB or 1 million 64-bit words.

10
New cards

What is the unit of transfer in a memory hierarchy?

The unit of transfer is the amount of data moved between levels of the hierarchy in a single operation, which could be small (like a word), medium (like a block), or large (like a page).

11
New cards

What are the different access methods used by memory systems?

Random access, Sequential access, Direct access.

12
New cards

What key metrics are used to measure memory performance?

Access time (latency), Cycle time, Transfer rate (bandwidth).

13
New cards

What are the common physical types of memory?

Semiconductor (e.g., SRAM, DRAM), Magnetic (e.g., hard disks), Optical (e.g., CDs).

14
New cards

What physical characteristics are used to categorize memories?

Key characteristics include Volatility, Erasability, and Write capability.

15
New cards

What is the fundamental challenge in designing memory for a computer system?

The trade-off between capacity, speed, and cost.

16
New cards

How does the memory hierarchy help address the challenge in designing memory?

Divides the memory system into levels optimized for different points in the capacity/speed/cost trade-off.

17
New cards

What are the typical levels in a memory hierarchy and their characteristics?

From smallest/fastest to largest/slowest: CPU registers, L1 cache, L2 cache, L3 cache, Main memory (DRAM), SSD, HDD.

18
New cards

What are the key ideas that make the memory hierarchy work?

Temporal locality, spatial locality, caching.

19
New cards

How does the cost per bit and access time change as we move up the memory hierarchy?

Cost per bit increases while access time decreases.

20
New cards

How big should each level of the hierarchy be?

It's a trade-off between cost and performance.

21
New cards

What happens on a memory access in the memory hierarchy?

The processor checks successively larger levels until the data is found.

22
New cards

How is data exchanged between levels of the memory hierarchy?

Data is moved between adjacent levels in blocks.

23
New cards

What is a cache miss and why do they happen?

A cache miss occurs when the processor requests data from the cache but it is not there, requiring a fetch from a slower memory level.

24
New cards

How do cache misses affect performance?

Cache misses stall the processor, depending on miss penalty and miss rate.

25
New cards

What are the different types of cache misses?

Compulsory misses, Capacity misses, Conflict misses.

26
New cards

How do cache size, block size, and associativity affect miss rate?

Cache size affects capacity misses, block size impacts spatial locality, and associativity reduces conflict misses.

27
New cards

What are the key ideas behind multilevel caches?

They exploit temporal and spatial locality using a hierarchy of caches.

28
New cards

How do we measure the performance of a multilevel cache system?

Using Average Memory Access Time (AMAT).

29
New cards

What's the bottom line for multilevel cache design?

Caches exploit locality and differ in hit rates and access times, tailoring to workload needs.

30
New cards

What is cache size and how does it affect performance?

Cache size refers to the total amount of data the cache can hold; larger caches reduce misses.

31
New cards

What is the cache mapping function and what are the main types?

It determines where a memory block is placed in the cache; types include Direct mapped, Fully associative, Set associative.

32
New cards

What is the cache replacement policy and why is it important?

It decides which block to evict from a full cache; affects both hit rate and complexity.

33
New cards

What are the main cache write strategies and their trade-offs?

Write through propagates changes immediately; Write back reduces memory traffic.

34
New cards

What is the line or block size and how does it affect performance?

It's the unit of data transfer between cache and memory; larger sizes can exploit locality but may increase transfer times.

35
New cards

What are the main cache performance metrics?

Hit time, Miss penalty, Miss rate, leading to Average Memory Access Time (AMAT).

36
New cards

What are the key takeaways for cache design?

Maximize performance through trade-offs regarding locality, cache size, associativity, and optimization techniques.

37
New cards

What is the purpose of the cache mapping function?

Determines where a memory block can be placed in the cache, affecting hit rate and complexity.

38
New cards

What are the three main types of cache mapping functions?

Direct mapped, Fully associative, Set associative.

39
New cards

How does direct mapped cache work?

Each memory block maps to one cache location based on its address.

40
New cards

What are the advantages and disadvantages of direct mapped cache?

Advantages: Simple and fast. Disadvantages: Lower hit rate due to flexibility issues.

41
New cards

How does fully associative cache work?

A memory block can be placed anywhere in the cache, searching all locations in parallel.

42
New cards

What are the advantages and disadvantages of fully associative cache?

Advantages: Highest flexibility and hit rate. Disadvantages: Complex and slower access time.

43
New cards

How does set associative cache work?

Divides cache into sets for flexible placement with reduced conflict misses.

44
New cards

What are the advantages and disadvantages of set associative cache?

Advantages: Balance of flexibility and simplicity. Disadvantages: More complex than direct mapped.

45
New cards

How is the cache organized in a set associative scheme?

Organized as a 2D array of sets and blocks.

46
New cards

What are the key factors in choosing a cache mapping function?

Cache size, workload characteristics, performance requirements, power and cost budget.

47
New cards

What is the main goal of cache performance optimization?

To minimize Average Memory Access Time (AMAT).

48
New cards

What factors affect cache hit time?

Cache size, associativity, technology.

49
New cards

What is cache miss rate and what affects it?

It's the fraction of accesses that result in a miss, affected by program behavior and cache design.

50
New cards

What is miss penalty and what affects it?

Miss penalty is the time to fetch data on a miss, affected by memory technology and architecture.

51
New cards

What are some common cache optimization techniques?

Multi-level caches, out-of-order execution, non-blocking caches, prefetching, victim caches.

52
New cards

What is the CPU time formula and how does it relate to cache performance?

CPU time = (CPU clock cycles + Memory stall cycles) × Clock cycle time, showing cache performance impact.

53
New cards

What is the role of cache performance models?

Analytical tools for estimating cache performance metrics and optimizing designs.

54
New cards

What is the basic element of semiconductor memory?

The memory cell, which can represent binary 1 and 0.

55
New cards

What are the three functional terminals of a memory cell?

Select, control, and data.

56
New cards

What is the difference between DRAM and SRAM?

DRAM stores data as charge on capacitors and requires refreshing; SRAM uses flip-flops and does not.

57
New cards

What are the types of ROM?

ROM, PROM, EPROM, EEPROM, Flash Memory.

58
New cards

How are memory chips organized?

Into arrays of memory cells.

59
New cards

What is the purpose of chip packaging?

To mount memory chips on packages with pins for connection.

60
New cards

How can memory modules be organized?

To form larger systems, such as 256K 8-bit words with multiple chips.

61
New cards

What is interleaved memory?

Organized to allow simultaneous servicing of multiple requests, increasing rates.

62
New cards

What are the main objectives of an operating system (OS)?

Convenience and efficiency.

63
New cards

What services does an OS provide as a user/computer interface?

Program creation, execution, I/O device access, file access, system access, error detection, accounting.

64
New cards

How does an OS function as a resource manager?

It directs the processor in the use of system resources.

65
New cards

What are the types of operating systems?

Batch systems, interactive systems, multiprogramming systems.

66
New cards

What were the main problems with early systems?

Scheduling issues and inefficiencies.

67
New cards

How did simple batch systems improve processor utilization?

By batching jobs and using a monitor for sequencing.

68
New cards

What is multiprogramming?

Keeping multiple jobs in memory simultaneously to maximize utilization.

69
New cards

What is time-sharing in operating systems?

Allowing multiple users to interact with the system simultaneously.

70
New cards

What is swapping in memory management?

Moving processes between memory and storage to keep the processor busy.

71
New cards

What are the two types of partitioning in memory management?

Fixed-size partitions and variable-size partitions.

72
New cards

What is paging in memory management?

Divides memory into pages, corresponding to frames in memory.

73
New cards

What is virtual memory?

Allows processes to execute larger than available physical memory using demand paging.

74
New cards

What is page replacement?

Replacing an existing page in memory with a new page.

75
New cards

What is the Translation Lookaside Buffer (TLB)?

A cache for recent page table entries to speed up address translation.

76
New cards

What is segmentation in memory management?

Divides memory into segments of varying sizes representing logical units.

77
New cards

What are the elements of a machine instruction?

Operation code (Opcode), Source Operand Reference, Result Operand Reference, Next Instruction Reference.

78
New cards

What is the purpose of the Operation Code (Opcode) in a machine instruction?

Specifies the operation to be performed.

79
New cards

What does the Source Operand Reference indicate in a machine instruction?

Indicates the input for the operation.

80
New cards

What does the Result Operand Reference specify in a machine instruction?

Specifies where to store the result of the operation.

81
New cards

What is the Next Instruction Reference in a machine instruction?

Tells where to fetch the next instruction after the current one.

82
New cards

What are the common types of instructions in a machine instruction set?

Data Processing, Data Storage, Data Movement, Control.

83
New cards

What are the types of data transfer instructions?

Register to Register, Register to Memory, Memory to Register, Memory to Memory.

84
New cards

What are the common arithmetic operations provided by most machines?

Add, Subtract, Multiply, Divide.

85
New cards

What are addresses in the context of machine instructions?

Addresses reference memory locations and can be considered as unsigned integers.

86
New cards

What are the common types of numerical data in computers?

Binary integer, binary floating point, decimal.

87
New cards

What is packed decimal representation?

Each decimal digit is represented by a 4-bit code, with two digits per byte.

88
New cards

How are characters represented in computers?

Characters are represented by bit sequences using ASCII and EBCDIC codes.

89
New cards

What is logical data?

Logical data treats each bit of a word as an independent unit.

90
New cards

What are the common types of operations in machine instructions?

Data transfer, arithmetic, logical, conversion, I/O, system control, transfer of control.

91
New cards

What is involved in a data transfer operation?

Moving data between memory, registers, or I/O devices.

92
New cards

What are the basic arithmetic operations provided by most machines?

Add, subtract, multiply, and divide.

93
New cards

What are logical operations used for?

Manipulating individual bits of a word.

94
New cards

What is a conversion operation?

Changing the format or operating on data formats.

95
New cards

What is the purpose of I/O operations?

Handling data transfer between the CPU and peripheral devices.

96
New cards

What are system control operations?

Instructions that control the operation of the CPU and manage resources.

97
New cards

What is involved in transfer of control operations?

Changing the sequence of execution, such as jumps and calls.