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 factor and the number of file blocks
needed to store the data, assuming an unspanned organization.
Assume the file is ordered by the key field Ssn. You need to create
a B+ tree primary index.
c. If each node is a the size of a disk block, how many key
pointers fit into an node?
d. Calculate the total number of blocks needed to store this
index.
Ans
1=Record size=(30+9+9+40+10+8+1+4+4+1)=116 byte
2=Blocking factor=floor(block size/record size)=floor(4096/116)=35 records per block
Number of block needed=ceiling(number of records/blocking factor)=ceiling(100000/35)=2858 blocks
If file is ordered by key field SSn
3=key pointer fit in a node(of block size)=floor(node size/(key field size+block pointer)
=floor(4096/(9+6)=273 entries/node
4=No of blocks needed for this index=ceiling(no of blocks needed for file/number of key pointer fit in an node)
=ceiling(2858/273)
=11 blocks
Consider a disk with block size = 4096 bytes. A block pointer is 6 bytes and...
Problem 1. Consider a disk with block size B=1024 bytes. A block pointer is P = 8 bytes long, and a record pointer is R =7 bytes long. A file has r=5,000,000 EMPLOYEE records of fixed- length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), DEPARTMENTCODE (9 bytes), ADDRESS (35 bytes), PHONE (9 bytes), BIRTHDATE (8 bytes), SEX (1 byte), JOBCODE (4 bytes), SALARY (4 bytes, real number). An additional byte is used as a deletion...
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 an empty 1 Gbyte disk with the block size of 4096
bytes. When the disk is formatted blocks 0 is occupied for
system-related information. The system always allocated free blocks
starting st the lowest numbered block, and it uses non-contiguous
allocation.
Question 6 (2, 4) Consider an empty 1 Gbyte disk with the block size of 4096 bytes. When the disk is formatted blocks 0 is occupied for system-related information. The system always allocates free blocks starting at the...
How many disk accesses are needed to bring byte i of a file into memory when the file is stored using contiguous allocation? Assume only the file’s FCB is in memory , block pointers require 32 bits , and that blocks hold 4096 bytes each. 3 accesses 1 + [ i/4096] accesses [i/4096 accesses 2 accesses 1 access
How many disk accesses are needed to bring byte i of a file into memory when the file is stored using contiguous allocation? Assume only the file’s FCB is in memory , block pointers require 32 bits , and that blocks hold 4096 bytes each. 3 accesses 1 + [ i/4096] accesses [i/4096 accesses 2 accesses 1 access
1. (10 pts) What is the largest file size if the inode is as follows: size of the inode is 128 Bytes out of which 64 Bytes are used for layout information, . each pointer is of size 8 Bytes and the file system block size is 4 KBytes, the inode has 2 direct pointers, 2 single indirect pointers, 2 double indirect pointers, and 2 triple indirect pointers 2. (10 pts) Find the average seek time (under the assumptions we...
How many disk accesses are needed to bring byte 4090 of a file into memory when the file is stored using double indirect indexed allocation? Assume that only the file's FCB is in memory, block pointers require 32 bits, and that blocks hold 1024 bytes each.
How many disk accesses are needed to bring byte 4090 of a file into memory when the file is stored using double indirect indexed allocation? Assume that only the file's FCB is in memory,...
Really don't know what its about...
Course in operating system, file system
Question 2. File Systems (10 marks) (a) Consider a 32GB hard disk and a FAT file system with 24 bits cluster (block) address. What is the minimum block (cluster) size in order to fully utilize all space in the hard disk? (3 marks) (b) Consider an index-based file system with the inode containing 64 direct pointers, 1 indirect pointer, and 1 double-indirect pointer. Suppose the size of a...
Consider a disk with a sector size of 512 bytes, 2000 tracks per surface, 50 sectors per track, five double-sided platters, and average seek time of 10 msec Suppose that a block size of 1024 bytes is chosen. Suppose that a file containing 100,000 records of 100 bytes each is to be stored on such a disk and that no record is allowed to span two blocks 1. Suppose the interleaving factor is 3. What time is required to read...
Consider a file system that uses inodes to represent files. Disk blocks are 4-KB in size and a pointer to a disk block requires 4 bytes. This file system has 12 direct disk blocks, plus two single indirect disk blocks. What is the maximum size of a file that can be stored in this file system? A single indirect disk block points to a block where its whole space is used to point to data blocks. Please explain it as...