Question

A PARTS file with Part# as hash key includes records with the following Part# values: 2369,...

  1. A PARTS file with Part# as hash key includes records with the following Part# values: 2369, 3760, 4692, 4871, 5659, 1821, 1074, 7115, 1620, 2428, 3943, 4750, 6975, 4981, 9208. The file uses 8 buckets, numbered 0 to 7. Each bucket is one disk block and holds two records. Load these records into the file in the given order using the hash function h(K)=K mod 8. Calculate the average number of block accesses for a random retrieval on Part#.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution

How to fill this table

divide each value by 8 then take out the remainder

2369-1
3760-0
4692-4
4871-7
5659-3
1821-5
1074-2
7115-3
1620-4
2428-4
3943-7
4570-6
6975-7
4981-5
9208-0

0

3760

9208

1

2369

2

1074

3

5659

7115

4

4692

1620

2428(OVERFLOW)

5

1821

4981

6

4750

7

4871

3943

6975(OVERFLOW)

OVERFLOW

4692 1620 2428(OVERFLOW) 1821 4981 4750 4871 3943 6975(OVERFLOW)

it allow only 2 posts
but we have overflow at 4 & 7
Please use chaining to solve this

During calculation of average block reads we have 2 block requiring 2 block, and 13 requiring only 1

so
we have

=13/15\*1+2/15*2
=17/15
=17/15 block accesses

---

all the best

if there is anything, please let me know, love to help

please upvote

Add a comment
Know the answer?
Add Answer to:
A PARTS file with Part# as hash key includes records with the following Part# values: 2369,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT