程序代写代做代考 Out of 2 marks

Out of 2 marks
Sample Solutions for Record Calculations
Version 1: 21,000 records, 300 pages of size 4K Solution:
 [0.5 mark] 21000 rec / 300 pages = 70 rec/page (watch for multiplication of bytes that span two pages, deduct 0.5)
 [1.0 marks] Solve for b: 70 rec/page = ceiling( 4096 bytes/page / b bytes/record)
 [0.5 marks] b = 58 bytes/record
 can give 1 out of 2 if no work shown, but the correct final answer is there
Version 2: 25,000 records, 125 pages of size 4K Solution:
 [0.5 mark] 25000 rec / 125 pages = 200 rec/ page (watch for multiplication of bytes that span two pages, deduct 0.5)
 [1.0 marks] Solve for b: 200 rec/page = ceiling( 4096 bytes/page / b bytes/record)
 [0.5 marks] b = 20 bytes/record
 can give 1 out of 2 if no work shown, but the correct final answer is there
Version 3: key of size k with 4K index pages and 20% free space Solution:
 [0.5 mark] floor(0.8(4096)) = 3276 bytes available per page (we’ll accept 3277)
 [1.0 marks] Solve for k: 100 DE/page = ceiling( 3276 bytes/page / (k + 10) bytes/DE)
 Approximately: k + 10 = 3276/100
 [0.5marks] k=32–10=22bytesforthekey
 can give 1 out of 2 if no work was shown, but the correct final answer is there
Version 4: key of size k with 4K index pages and 30% free space Solution:
 [0.5 mark] floor(0.7(4096)) = 2867 bytes available per page (we’ll accept 2868)
 [1.0 marks] Solve for k: 60 DE/page = ceiling( 2867 bytes/page / (k + 10) bytes/DE)
 Approximately: k + 10 = 2867/60
 [0.5marks] k=47–10=37bytesforthekey
 can give 1 out of 2 if no work was shown, but the correct final answer is there