One small query in relation between buckets and directories in extendible hashing.

30 views
Skip to first unread message

Vivek Nakum

unread,
May 6, 2021, 8:56:02 AM5/6/21
to COMP9311-21T1
Hello Tutors,

In extendible hashing,
If global depth of directory is let me say 4, and there is a directory with id 1001. Now suppose there is a bucket A of local depth 3 with id 001. So, will this directory id 1001 point to this bucket?

While pointing to a directory to a bucket, should we see the last d' bits of directory or should we see the first d' bits of directory where d' is a local depth.

If we see the first d' bits of directory id, then the directories which will point to this bucket are 0010 and 0011. If we see the last d' bits, then the directories which will poin to this bucket are 0001 and 1001. 

So, this is a very big confusion that I have. I request you to answer it as soon as possible

Yu Hao

unread,
May 6, 2021, 10:10:53 PM5/6/21
to COMP9311-21T1
Hi,
Using the first bits or the last bits depends on the rule pre-defined.
In our lecture slides, we use the last bits:
screenshot.png
You might find that some other materials online use the first bits. It is not incorrect, but you should follow what Prof. Lin taught in the lectures if you try to answer a question in this course.
Cheers,
Yu
Reply all
Reply to author
Forward
0 new messages