Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fan Qi Database Lab 1, com1 #01-08 CS3223 Midterm Solution.

Similar presentations


Presentation on theme: "Fan Qi Database Lab 1, com1 #01-08 CS3223 Midterm Solution."— Presentation transcript:

1 Fan Qi Database Lab 1, com1 #01-08 CS3223 Midterm Solution

2 Question 1 Clock Replacement Current: points to some buffer frame Reference bit: turns on when its pin count becomes 0, turns off when checked by current Replacement: referenced bit off & pin count = 0 Dirty: it has been modified & not updated on disk

3 Question Pin count:0 Refer: off Dirty: true Pin count:0 Refer: off Dirty: false Pin count:1 Refer: off Dirty: true Pin count:0 Refer: on Dirty: false

4 Question Pin count:0 Refer: off Dirty: true Pin count:0 Refer: off Dirty: false Pin count:1 Refer: off Dirty: true Pin count:0 Refer: on Dirty: false

5 Question Pin count:0 Refer: off Dirty: true Pin count:0 Refer: off Dirty: false Pin count:1 Refer: off Dirty: true Pin count:0 Refer: on Dirty: false

6 Question Pin count:0 Refer: off Dirty: true Pin count:0 Refer: off Dirty: false Pin count:1 Refer: off Dirty: true Pin count:0 Refer: on Dirty: false

7 Question 2

8 Question 3

9 Question 4 L1 L2 L3L4L5L6L7

10 Question 4 Notice the bucket split After Insert 130,120 After Insert 130,120,65,79

11 Question 5 A): any possible solution is accepted Need to ensure to do trigger bucket split, before filling up buck 1 0,4,11,7,5,6 B): any possible solution is accepted Need to ensure to trigger two bucket split 0,4,6,11,7,5 C): next = 1 Step 1: look at the last bit of 8, it is in bucket 0 Step 2: bucket 0 has been split, look at second bit of 8, its in bucket 0 Step 3: bucket 0 is full, trigger bucket split on next

12 Question 6 (10,30) (10,11) (10,12) (10,30) (10,40)

13


Download ppt "Fan Qi Database Lab 1, com1 #01-08 CS3223 Midterm Solution."

Similar presentations


Ads by Google