A UNIX-type file-system uses a disk block size of 1KB, 128 byte inodes, and 32 bit disk addresses. If the inode contains 64 bytes of data, 8 direct, 1 indirect, 1 double-indirect, and 1 triple- indirect blocks, apart from other file information. How many disk blocks would be required for storing files of sizes
(a) 1 byte
(b) 1024 bytes
(c) 64 KB
(d) 1MB ?
Disk block size is 1 KB = 1024 bytes
Inode size = 128 bytes
Disk addresses = 4 bytes
Inode contains 64 bytes of data, 8 direct, 1 indirect, 1 double-indirect, 1 triple-indirect blocks
Size of each disk block is 1 KB and size of each disk block address is 32 bits(4 bytes).
So, each indirect block can addresses: 2^10 bytes / 2^2 bytes = 2^8 blocks, which can store in total of 2^8 *1024 = 262144 bytes.
a) 1 bytes: Inode stores the data(64 bytes), 1 inode is sufficient to store 1 byte file
b)1024 bytes: 1 inode + 1 direct data block(as the size of block is 1024 bytes)
c) 64 KB( 65536 bytes): 1 inode + 8 direct data blocks( 8*1024 = 8192 bytes) + 1 indirect data block + 56 data blocks
After using 8 direct blocks, remaing 57344 bytes (65536-8192 = 57344 ) should be stored in 56 blocks(57344/1024) using 1 indirect data block
d) 1 MB : 1 inode + 8 direct data blocks + 1 indirect block + 256 data blocks + 4 double indirect pointer blocks of overhead + 760 data blocks
After using 8 direct blocks and 1 indirect data blocks, remaing 778240(760Kbytes) bytes (1048576 - 8192 - 262144), still 760 data blocks are required. So 1 double indirect data block should also be used to point 4 blocks which in turn each points to 256 data blocks
1 double indirect can address 2^8*2^8*2^10 = 2^26 bytes
A UNIX-type file-system uses a disk block size of 1KB, 128 byte inodes, and 32 bit...
Consider a file system that uses 1KB blocks and 16-bit disk addresses. If inodes hold 8 disk addresses for data blocks, one single-indirect block address, and one double-indirect block address. What is the maximum file size?
Consider a file system that uses inodes to represent files. To locate the physical blocks of each file, its inode contains up to 12 direct disk blocks, as well as one single, one double, and one triple indirect disk blocks. a. If disk blocks are 1 KB in size, and a pointer to a disk block requires 4 bytes. What is the maximum size of a file that can be stored in this file system? Note the size of a...
Computer Science Operation System question. I will give thumb up, thank you! Consider a file system that uses inodes to represent files. This file system has 16 direct disk blocks, as well as single, double, and triple indirect disk blocks. This file system is illustrated in the below figure. Please notice that the tables pointed to by the indirect pointers are full sized blocks that only stores pointers. mode owners (2) timestamps (3) size block count data data data direct...
Q1) A particular implementation of UNIX operating system provides the file structure modelled in the Figure 1. Here the i-node for the file contains certain information such as the access permissions for the file. This is followed by the entries that contain information about where the file is located on the storage device. The first 10 entries are the addresses of blocks where actual data for the file are stored. If block can contain 512 bytes of information, then these...
a drive has 512 sectors per track a block size of 512 bytes and spins at 12000 rpm. (a)what is the max file size in terms of blocks for a unix file system with 1024 byte blocks and 32 bit bloack addresses if every i-node has 10 direct block addresses, 1 indirect block address, 1 double indirect block address and 1 triple indirect block address. (B) consider the prefix code : b: 1111 a:1110 i:1101 j:1100 s:101 t:100 1:01 3:00...
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...
Given a Ext3 filesystem that uses: - 32 bit addresses, - 512 byte blocks on disk, - 16 direct addresses and - up to a level 3 indirection Answer the following questions: 1) How many blocks does a 12KiB file need? 2) What is the largest file size (in KiB) that does not need indirect block references? 3) What is the largest file size (in KiB) possible using only single indirection? 4) A file that is 1104 bytes in size,...
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,...
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...
STORAGE AND FILE SYSTEM • Example 9-A 32-bit Berkeley UNIX file system has a block size of 8 kilobytes. How many blocks of a given file can be accessed: • (a) Using the block addresses stored in the i-node? blocks • (b) With one level of indirection? blocks _blocks • (c) With two levels of indirection?