Exam Flashcards

1
Q

Name advantages of colum-wise storage (DMS)

A

Store only one column per page
=> All data is relevant for query

  • Fetch less data from memory
  • Data compression might work better
  • if lucky, full data fits into cache
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain Binary Association Tables (MonetDB)

A

All tables have two columns (head and tail)

Each column yields one binary association table (BAT)

Identify matching entries by using object identifiers (oid)

Using virtual oids they do not need to be materialized in memory (using only an index)

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

Describe Hardware Trends and memory wall, and their implications

A

Processors get performance boosts faster than memory, yielding a performance gap between CPU and meory speed which is called “memory wall”.
This means that CPUs spend much of their time waiting for memory

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

Do modern processors implement write back or write through?

A

Write back

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

Explain Direct-Mapped Cache

A

A block can appear at only one place in the cache

  • simpler to implement
  • faster
  • increased chances of conflict
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain Fully Asociative Cache

A

A block can be loaded into any cache line

  • does not scale
  • used for small Translation Lookaside Buffers (TLB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain Principle of Locality

A

Pareto Principle (80-20)

Spatial Locality:

  • Code contains loops
  • Data is spatially close

Temporal Locality:

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

Explain Set-Associative Cache

A
  • Group cache lines into sets
  • map blocks to sets
  • place block anywhere within a set
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain the consequences of operator-at-a-time processing

A

Consume and produce full columns
Materialize every (sub)result in memory
Run each operator exactly once

Extremely tight loops

  • fit into instruction caches
  • -can be optimized by compilers:
  • – Loop unrolling
  • – Vectorization (SIMD)
  • – Hardware prefetching
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain the consequences of tuple-at-a-time processing

A

Tightly interleaved
=> Combined instruction footprint large
=> Instruction Cache Misses

Large function call overhead
=> Millions of calls

Very Low instructions-per-cycle (IPC) ratio

Combined states too large for cache
=> Data Cache Misses

Hard to optimize by compiler

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

Explain Volcano Iterator Model (tuple-at-a-time)

A
  • operator request tuples from their input using next()
  • “Pipelining”
  • operators keep their states
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Explain Word Size

A

Word Size refers to the size of the natural unit of data “word”

A wordsize typically today is 32bit or 64bit

1 Word or multiple words are used to save integers/floats/adresses

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

Explain Write Back

A

Data is only written into cache

  • Status field acts as modified marker

Write on eviction of dirty cache lines

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

Explain Write Through

A

Data is directly written to lower-level memory (and cache)

  • Writes stall the CPU
  • Simplifies Data Coherency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do systems compensate for slow memory? (name 6)

A

Systems use caches:

  • DRAM with high capacity, but long latency
  • SRAM with better latency, but low capacity
  • Memory Hierarchy
  • Cache Lines
  • Set associativity
  • Locality of data and code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How to identify a block?

A

Derive a tag from the memory address

17
Q

Implications of Cache Parameters (Size, n-way associative)

A

Cache misses decrease

18
Q

Name a disadvantage of row-based storage (NSM)

A

Tuples are stored sequentially on a database page

  • Load irrelevant information into the cache
19
Q

Name advantages of colum-wise storage (DMS)

A

Store only one column per page
=> All data is relevant for query

  • Fetch less data from memory
  • Data compression might work better
  • if lucky, full data fits into cache
20
Q

Name three different strategies of block replacement

A

Least Recently Used LRU
First In First Out FIFO
Random