Eleven Reads To Read
A vsfs-style file system is freshly mounted, so the superblock is in memory and every other structure is still on disk with an empty cache. A process runs:
int fd = open("/foo/bar", O_RDONLY); /* bar is 12 KB, three 4 KB blocks */
read(fd, buf, 4096);
read(fd, buf, 4096);
read(fd, buf, 4096);
close(fd);
How many disk reads does the open() alone issue, and how many of the I/Os in the whole sequence touch the inode bitmap or the data bitmap?
Sign in to answer questions and track your progress
Sign In