Final presentation

Post on 06-Jan-2016

17 views 0 download

description

Hit Or miss predictor. Final presentation. Software Engineering Lab. Spring 07/08 Supervised by: Zvika Guz Introduced by: Akram Baransi Amir Salameh. Hit or Miss ? !!!. Predictor Requirements. Small size. Simple and fast. - PowerPoint PPT Presentation

Transcript of Final presentation

Final presentation

Hit Or misspredictor

Hit or Miss!!! ?

Software Engineering Lab.Spring 07/08

Supervised by: Zvika Guz

Introduced by: Akram BaransiAmir Salameh

Small size. Simple and fast. Implementable with hardware. Does not need too much power. Does not predict miss if we have a hit. Have a high hit rate especially on misses.

Hit or Miss!!! ?

PREDICTOR REQUIREMENTS

Bloom filter: is a method representing a set of N elements (a1,…,an) to support membership queries.

The idea is to allocate a vector v of m bits, initially all set to 0.

Choose k independent hash functions, h1,… ,hk ,each with range 1…m .

For each element a, the bits at positions h1(a), ..., hk(a) in v are set to 1.

SIMPLE PREDICTORBLOOM FILTER

Given a query for b we check the bits at positions h1(b), h2(b), ..., hk(b).

If any of them is 0, then certainly b is not in the set A.

Otherwise we conjecture that b is in the set although there is a certain probability that we are wrong. This is called a “false positive”.

The parameters k and m should be chosen such that the probability of a false positive (and hence a false hit) is acceptable.

SIMPLE PREDICTORBLOOM FILTER

We used a separate predictor for each set in the L2 cache.

Set 0

Set 1

Set N

Set 0

Set 1

Set N

Set 0

Set 1

Set N

Set 0

Set 1

Set N

Array 0

Array 1

Array N

0

1

0

1

0

0

1

1

1

0

1

0

1

0

1

0

1

0

BLOOM PREDICTORIN L2 CACHE

Small size.

Simple and fast.

Implementable with hardware.

Does not need too much power.

Does not predict miss if we have a hit.

BLOOM FILTERADVANTAGES

If A is a dynamic group, and in our case it is a dynamic one, it will be too hard to update the array when removing an element “e” from A, we can’t simply turn off Bloom[H(e)], to do so we must check that there is no element “e1” in A such that H(e)=H(e1). And this take a lot of time.

If we don’t update the array the hit rate will become low.

BLOOM FILTERDISADVANTAGES

RESULTS ANALYSIS

Apache 2M

Apache 4M

Apache 8M

Apache 16M

Barnes 2M

Barnes 4M

Barnes 8M

Barnes 16M

Equak 2M

Equak 4M

Equak 8M

Equak 16M

0.00%

10.00%

20.00%

30.00%

40.00%

50.00%

60.00%

70.00%

80.00%

90.00%

100.00%

80.12%84.60%

91.85%95.66%

86.00%

95.79%98.96%99.66%

84.53%87.81%

90.49%91.38%

Predector Hit Rate On Misses

Cache Hit Rate