search
Log In

Recent questions tagged file-system

0 votes
1 answer
1
0 votes
0 answers
2
Implement a simulated file system that will be fully contained in a single regular file stored on the disk. This disk file will contain directories, i-nodes, free-block information, file data blocks, etc. Choose appropriate algorithms for maintaining free-block ... to create/delete directories, create/delete/open files, read/write from/to a selected file, and to list directory contents.
asked Oct 28, 2019 in Operating System Lakshman Patel RJIT 51 views
0 votes
0 answers
3
Implement a program to measure the impact of application-level buffer sizes on read time. This involves writing to and reading from a large file (say, $2$ GB). Vary the application buffer size (say, from $64$ bytes to $4$ KB). Use timing measurement ... buffer sizes. Analyze the results and report your findings: does buffer size make a difference to the overall write time and per-write time?
asked Oct 28, 2019 in Operating System Lakshman Patel RJIT 71 views
0 votes
0 answers
4
Write a new version of the UNIX ls program. This version takes as an argument one or more directory names and for each directory lists all the files in that directory, one line per file. Each field should be formatted in a reasonable way given its type. List only the first disk address, if any.
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 27 views
0 votes
0 answers
5
Write a program that scans all directories in a $UNIX$ file system and finds and locates all i-nodes with a hard link count of two or more. For each such file, it lists together all file names that point to the file.
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 34 views
0 votes
0 answers
6
Write a program that starts at a given directory and descends the file tree from that point recording the sizes of all the files it finds. When it is all done, it should print a histogram of the file sizes using a bin width specified as a parameter (e.g., with $1024,$ file sizes of $0$ to $1023$ go in one bin, $1024$ to $2047$ go in the next bin, etc.).
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 37 views
0 votes
0 answers
7
Write a program that reverses the bytes of a file, so that the last byte is now first and the first byte is now last. It must work with an arbitrarily long file, but try to make it reasonably efficient.
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 52 views
0 votes
0 answers
8
In many UNIX systems, the i-nodes are kept at the start of the disk. An alternative design is to allocate an i-node when a file is created and put the i-node at the start of the first block of the file. Discuss the pros and cons of this alternative.
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 35 views
0 votes
0 answers
9
How many disk operations are needed to fetch the i-node for a file with the path name /usr/ast/courses/os/handout.t? Assume that the i-node for the root directory is in memory, but nothing else along the path is in memory. Also assume that all directories fit in one disk block.
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 114 views
1 vote
0 answers
10
0 votes
1 answer
11
Files in $MS-DOS$ have to compete for space in the $FAT -16$ table in memory. If one file uses $k$ entries, that is $k$ entries that are not available to any other file, what constraint does this place on the total length of all files combined?
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 30 views
1 vote
3 answers
12
Given a disk-block size of $4\: KB$ and block-pointer address value of $4$ bytes, what is the largest file size (in bytes) that can be accessed using $10$ direct addresses and one indirect block?
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 172 views
0 votes
1 answer
13
A certain file system uses $4-KB$ disk blocks. The median file size is $1 KB.$ If all files were exactly $1 KB,$ what fraction of the disk space would be wasted? Do you think the wastage for a real file system will be higher than this number or lower than it? Explain your answer.
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 65 views
0 votes
1 answer
14
Consider the idea behind Fig. $4-21,$ but now for a disk with a mean seek time of $6\: msec,$ a rotational rate of $15,000\: rpm,$ and $1,048,576$ bytes per track. What are the data rates for block sizes of $1\: KB, 2\: KB,$ and $4\: KB,$ respectively?
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 41 views
0 votes
1 answer
15
Consider a disk that has $10$ data blocks starting from block $14$ through $23.$ Let there be $2$ files on the disk$: f1$ and $f2.$ The directory structure lists that the first data blocks of $f1$ and $f2$ are respectively $22$ and $16.$ Given the $FAT$ table entries as ... $(x, y)$ indicates that the value stored in table entry $x$ points to data block $y.$
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 25 views
0 votes
0 answers
16
Consider an application where students’ records are stored in a file. The application takes a student $ID$ as input and subsequently reads, updates, and writes the corresponding student record; this is repeated till the application quits. Would the "block read ahead" technique be useful here?
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 25 views
0 votes
0 answers
18
The performance of a file system depends upon the cache hit rate (fraction of blocks found in the cache). If it takes $1\: msec$ to satisfy a request from the cache, but $40\: msec$ to satisfy a request if a disk read is needed, give a formula for the mean time required to satisfy a request if the hit rate is $h.$ Plot this function for values of $h$ varying from $0$ to $1.0.$
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 79 views
0 votes
0 answers
19
0 votes
0 answers
20
0 votes
0 answers
21
0 votes
0 answers
22
We discussed making incremental dumps in some detail in the text. In Windows it is easy to tell when to dump a file because every file has an archive bit. This bit is missing in $UNIX.$ How do $UNIX$ backup programs know which files to dump?
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 30 views
0 votes
0 answers
23
Oliver Owl’s night job at the university computing center is to change the tapes used for overnight data backups. While waiting for each tape to complete, he works on writing his thesis that proves Shakespeare’s plays were written by extraterrestrial visitors. His text processor runs on the system being backed up since that is the only one they have. Is there a problem with this arrangement?
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 38 views
0 votes
0 answers
24
What would happen if the bitmap or free list containing the information about free disk blocks was completely lost due to a crash? Is there any way to recover from this disaster, or is it bye-bye disk? Discuss your answers for $UNIX$ and the $FAT -16$ file system separately.
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 50 views
0 votes
1 answer
25
The beginning of a free-space bitmap looks like this after the disk partition is first formatted$:\: 1000\: 0000\: 0000\: 0000$ (the first block is used by the root directory). The system always searches for free blocks starting at the lowest-numbered block, so after writing ... $A$ is deleted. File $C$ is written, using eight blocks. File $B$ is deleted.
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 143 views
0 votes
1 answer
26
Free disk space can be kept track of using a free list or a bitmap. Disk addresses require $D$ bits. For a disk with $B$ blocks, $F$ of which are free, state the condition under which the free list uses less space than the bitmap. For $D$ having the value $16$ bits, express your answer as a percentage of the disk space that must be free.
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 50 views
0 votes
0 answers
30
Two computer science students, Carolyn and Elinor, are having a discussion about i-nodes. Carolyn maintains that memories have gotten so large and so cheap that when a file is opened, it is simpler and faster just to fetch a new copy of the i-node into the i-node table, rather than search the entire table to see if it is already there. Elinor disagrees. Who is right?
asked Oct 27, 2019 in Operating System Lakshman Patel RJIT 21 views
...