recategorized by
1,314 views
3 votes
3 votes
suppose that in a file organization record size(R)=150 bytes , block size (B)=512 bytes. there are totally 30000 records. the data field on which indexing is done is 9 bytes and block pointer size is 7 bytes how many block access will be needed to access a data item in case of single level primary indexing?
recategorized by

2 Answers

Best answer
6 votes
6 votes

10 is right .

selected by
2 votes
2 votes
No. of blocks in disk = (30000x150)/512 = 8789.

In primary indexing , one entry for each block is there , so number of blocks in index = (8789 x 16)/512 = 274.65 = 275.

Now , we can apply binary search for primary indexing .

ceil(log(275)) = 9

In worst case , it'll take 9 block transfers to locate the exact block and 1 extra transfer for getting that block.

Therefore total number of transfers = 10.

Related questions

0 votes
0 votes
0 answers
1
nag.swarna asked Dec 9, 2018
351 views
Can anyone explain this in detail???
0 votes
0 votes
0 answers
2
2 votes
2 votes
1 answer
3
2 votes
2 votes
1 answer
4