1. Homepage
  2. Programming
  3. [2021] CS 4348 Operating Systems Concepts - Project2 - V6 Directory Structure

[2021] CS 4348 Operating Systems Concepts - Project2 - V6 Directory Structure

Engage in a Conversation
CS 4348Operating Systems ConceptsUniversity of TexasCC++

University of Texas at Dallas--Computer Science Department CourseNana.COM

CS 4348 Operating Systems Concepts Spring 2021 CourseNana.COM

Project 2 CourseNana.COM

V6 file system is highly restrictive. A modification has been done: Block size is 2048 Bytes, i-node size is 64 Bytes and i-node’s structure and directory entry struct have been modified as well and given below: CourseNana.COM

typedef struct { CourseNana.COM

  int isize; CourseNana.COM

  int fsize; CourseNana.COM

  int nfree; CourseNana.COM

  unsigned int free[250]; CourseNana.COM

  unsigned int ninode; CourseNana.COM

  unsigned int inode[250]; CourseNana.COM

  int flock; CourseNana.COM

  int ilock; CourseNana.COM

  unsigned int fmod; CourseNana.COM

  unsigned int time; CourseNana.COM

} superblock_type; // Blocksie is 2048 Bytes superblock_type superBlock;
// i-Node Structure
CourseNana.COM

typedef struct { CourseNana.COM

unsigned short flags; CourseNana.COM

unsigned int nlinks; CourseNana.COM

unsigned int uid; CourseNana.COM

unsigned int gid; CourseNana.COM

unsigned int size; CourseNana.COM

unsigned int addr[9]; CourseNana.COM

unsigned short actime[2]; CourseNana.COM

unsigned short modtime[2]; CourseNana.COM

unsigned short dummy; //not used CourseNana.COM

} inode_type; //64 Bytes in size CourseNana.COM

typedef struct { CourseNana.COM

  unsigned int inode; CourseNana.COM

  unsigned char filename[28]; CourseNana.COM

} dir_type;//32 Bytes long CourseNana.COM

You need to develop a program called mod-v6.c (or mod-v6.cc) that implements the following three commands in C/C++: CourseNana.COM

1. openfs file_name CourseNana.COM

In this case, file_name is the name of the file in the native unix machine (where you are running your program) that represents the disk drive. CourseNana.COM

2.     initfs n1 n2
where n1 is the file system size in number of blocks and n2 is the number of blocks devoted to the i-nodes. In this case, set all data blocks free (except for one data block for storing the contents of i-node number 1, representing the root, which has the two entries . and .. All i-nodes except i-node number 1 are (unallocated) set to free. Make sure that all free blocks are accessible from free[] array of the super block.
CourseNana.COM

3.     count-free CourseNana.COM

in this case, report the number of free data blocks and number of free i-nodes available in the system. CourseNana.COM

Some useful Unix system calls: lseek(), read(), write(), open() This project must be done in C/C++ only.
Due date: May 1, 2021, 11:55 pm.
CourseNana.COM

  CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
CS 4348代写,Operating Systems Concepts代写,University of Texas代写,C代写,C++代写,CS 4348代编,Operating Systems Concepts代编,University of Texas代编,C代编,C++代编,CS 4348代考,Operating Systems Concepts代考,University of Texas代考,C代考,C++代考,CS 4348help,Operating Systems Conceptshelp,University of Texashelp,Chelp,C++help,CS 4348作业代写,Operating Systems Concepts作业代写,University of Texas作业代写,C作业代写,C++作业代写,CS 4348编程代写,Operating Systems Concepts编程代写,University of Texas编程代写,C编程代写,C++编程代写,CS 4348programming help,Operating Systems Conceptsprogramming help,University of Texasprogramming help,Cprogramming help,C++programming help,CS 4348assignment help,Operating Systems Conceptsassignment help,University of Texasassignment help,Cassignment help,C++assignment help,CS 4348solution,Operating Systems Conceptssolution,University of Texassolution,Csolution,C++solution,