Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider a file of 16384 records. Each record... Start Learning for Free
Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectively
  • a)
    8 and 0
  • b)
    128 and 6
  • c)
    256 and 4
  • d)
    512 and 5
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
Consider a file of 16384 records. Each record is 32 bytes long and its...
Total number of records = 16384 
Record size = 32 B 
lock size = 1024 B
Number of records inside block 
In index block number of entries 
So, at 1st level index block 
at 2nd level index block 
View all questions of this test
Most Upvoted Answer
Consider a file of 16384 records. Each record is 32 bytes long and its...
Given Information:
- File size = 16384 records
- Record size = 32 bytes
- Key field size = 6 bytes
- File organization = unspanned
- Block size = 1024 bytes
- Block pointer size = 10 bytes

Approach:
1. Calculate the number of records that can be stored in a block:
- Block size = 1024 bytes
- Record size = 32 bytes
- Number of records per block = 1024/32 = 32 records

2. Calculate the number of blocks required to store the file:
- File size = 16384 records
- Number of records per block = 32 records
- Number of blocks required = 16384/32 = 512 blocks

3. Calculate the number of index entries that can be stored in a block:
- Block size = 1024 bytes
- Key field size = 6 bytes
- Record pointer size = 10 bytes
- Size of index entry = 6 + 10 = 16 bytes
- Number of index entries per block = 1024/16 = 64 index entries

4. Calculate the number of index blocks required for the secondary index:
- Number of index entries = Number of records in the file = 16384
- Number of index entries per block = 64
- Number of index blocks required = 16384/64 = 256 blocks

5. Calculate the number of levels in the multilevel index:
- Number of index blocks = 256
- Number of index entries per block = 64
- Number of index entries at the root level = 256/64 = 4 entries
- Number of index entries at the next level = 4/64 = 1/16 entries
- Since the number of entries at the next level is less than 1, we need to create another level.
- Number of index entries at the next level = ceil(4/64) = 1 entry
- Therefore, there are 2 levels in the multilevel index.

6. Calculate the number of first-level and second-level blocks in the multilevel index:
- Number of index entries at the root level = 4 entries
- Number of index entries per block = 64
- Number of first-level blocks = ceil(4/64) = 1 block
- Number of index entries at the next level = 1 entry
- Number of second-level blocks = ceil(256/64) = 4 blocks

Answer:
The number of first-level and second-level blocks in the multilevel index are 256 and 4 respectively. Therefore, option (c) is the correct answer.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer?
Question Description
Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer?.
Solutions for Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer?, a detailed solution for Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectivelya)8 and 0b)128 and 6c)256 and 4d)512 and 5Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev