Question

Page size is 1K bytes, and the avg record size is 100 bytes. Given 1 million...

Page size is 1K bytes, and the avg record size is 100 bytes. Given 1 million records in a table, answering the following questions. 1) Suppose the table is stored in a heapfile, how many pages are in this file? 2) We will build an unclustered index B+ tree on this table over attribute A, how many data entries are contained in the leaf level? 3) Suppose A is integer type, what’s the size of a data entry? 4) Suppose each leaf level page is 70% filled, how many leaf level pages are needed? 5) What’s the size of one index entry? 6) What is the height of the B+ tree (suppose each index level page is also 70% filled)? 7) Given a query: find all records with 100

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

Solution

1)

Incase if it is 100 percent utilisation

Pages in the file will be

=106/(1000/100)

=106/10

=105

So the answer is

105 pages

--

2)

1 data entry per record

Please note that by default we use alternative two for a data entry

106

3)

8 bytes

Because search key value and pid

4)

Each leaf level page is 70% filled

So we need to assume 70% utilisation for the page

---

5)

Index entry is the search key value and pid

=search key value+pid

=8 bytes

---

6)

The index entry is the same size as the data entry

Therefore

The fanout of an index page is

[(1000/8)*0.7]+1

=88

“+1” is the left most pointer in an index page

The index page is 11429 pages in the leaf level

Therefore

The height of the tree

[log88 11429]

=3(without counting the root level or leaf level)

With the root level or leaf level

The height of the tree is

=4

---

all the best

Add a comment
Know the answer?
Add Answer to:
Page size is 1K bytes, and the avg record size is 100 bytes. Given 1 million...
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
  • 6) Paging [26 pts] Suppose you have a computer system with a 38-bit logical address, page size of 16K, and 4 bytes per...

    6) Paging [26 pts] Suppose you have a computer system with a 38-bit logical address, page size of 16K, and 4 bytes per page table entry a) How many pages are there in the logical address space? Suppose we use two level paging and each page table can fit completely in a frame. [4 pts] How many pages? [2 pts] Show your calculations here: b) For the above-mentioned system, give the breakup of logical address bits clearly indicating number of...

  • Suppose you have a page size of 4096 bytes and a process size of 93,425 bytes....

    Suppose you have a page size of 4096 bytes and a process size of 93,425 bytes. How many pages would the process need? What would be the internal fragmentation of the process? Suppose you have a page size of 2048 bytes and a process size of 501,345 bytes. How many pages would the process need? What would be the internal fragmentation of the process?

  • c) Assume a block size of 4096 bytes; one node per block; disk references of 8...

    c) Assume a block size of 4096 bytes; one node per block; disk references of 8 bytes each; and a record size of 160 bytes, with 10 bytes for the key: i) How many records will be stored in each leaf node? i In any index node? i) For the M-ary tree, what is the value of M? c) Assume a block size of 4096 bytes; one node per block; disk references of 8 bytes each; and a record size...

  • Consider a simple paging system with the following parameters: 232 bytes of physical memory; page size...

    Consider a simple paging system with the following parameters: 232 bytes of physical memory; page size of 210 bytes; 216 pages of logical address space. How many entries in the page table? How many bits in each page table entry? Assume each page table entry contains a valid/invalid bit.

  • Consider a simple paging system with the following parameters: 232 bytes of physical memory; page size...

    Consider a simple paging system with the following parameters: 232 bytes of physical memory; page size of 210 bytes; 216 pages of logical address space. How many bits are in a logical address? How many bytes in a frame? How many bits in the physical address specify the frame? How many entries in the page table?

  • You have a processor that supports virtual memory. The page size used for the virtual memory...

    You have a processor that supports virtual memory. The page size used for the virtual memory is 16 KiBytes, The virtual address size is 24 bits. Each table entry is 2 bytes. How many pages will the processor support? ___ How big is the page table (assume a single level page table) ___

  • 1. Consider a simple paging system with the following parameters: 232 bytes of physical memory; page...

    1. Consider a simple paging system with the following parameters: 232 bytes of physical memory; page size of 210 bytes; 216 pages of logical address space. How many bits are in a logical address? How many bytes are in a frame! How many bits in the physical address specify the frame? How many entries are in the page table? How many bits are in each page table entry? Assume each page table entry contains a valid/invalid bit. 2. Consider a...

  • A computer system has a 36-bit virtual address space with a page size of 8K, and...

    A computer system has a 36-bit virtual address space with a page size of 8K, and 4 bytes per page table entry. How many pages are in the virtual address space? What is the maximum size of addressable physical memory in this system? If the average process size is 8GB, would you use a one-level, two-level, or three-level page table? Why? Compute the average size of a page table in part c above

  • Consider a disk with block size = 4096 bytes. A block pointer is 6 bytes and...

    Consider a disk with block size = 4096 bytes. A block pointer is 6 bytes and a record pointer is 8 bytes long. A file has 100,000 records of fixed length. Each record has the following fields and byte size: Name (30), Ssn (9), Dept (9), Address (40), Phone (10), Bdate (8), Sex (1), Job (4) and Salary (4). An additional byte is used as a deletion marked. a. Calculate the record size R in bytes b. Calculate the blocking...

  • Assume that you have built a dense B+-tree index on SSN, and the B+-tree's leaf nodes...

    Assume that you have built a dense B+-tree index on SSN, and the B+-tree's leaf nodes contain record ids pointing to data records in data file. Assume 10-byte long. Assume also that you built the tree by using bulk loading so that the nodes at each level were filled up as much as possible. 4. a. b. How many levels does the resulting tree have? For each level of the tree, how many nodes are at that level? How many...

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