Question: The project for the current term is to implement (on a simulahed disk) a fle system based on the design explored in the lectures. This


The project for the current term is to implement (on a simulahed disk) a fle system based on the design explored in the lectures. This project is divided into four pieces. You must read and follow the Proiect Expectations. Study the grading sheet given below. This is Part 0 of the project for this term. You are expected to study and modfy the source code flles given in source. the and achieve the functionality described below. Do not use source code fles of others or even those of mine but from prior terms. Be Considerate. Do make sure that you are not using up too much space (say >10 MB) in your home directory. The following will show your disk space usage: it - is - 1. Learn Unix Commands Coming into the course, you are expected to be comfortable with Unix commands. Try all the commands of the Minimal List of Unix Commands You cannet claim to be Unix-familar unless you have used them all a few temes. Use script (read mun script) to demonstrate that you invoked the commands. A few commands cannot be nun unless you are super user for such commands, just capture its message. Turn this file in as a file named cadstrint. trt. 2. Studying a Program By the time P1 is due, we would have covered the process management necessary for this project. The tar ball sburce,tbe is a collection of files given so that (i) you can get started quichly with our project, and (ii) you can see the style of how larger systems programs are writen. Download source, the from the link above. In a Linux environment, it can be untar ed as follows: tar novf source, the The functionalty of source,tbz is described in What ls Given Some detals of the code arehere explained in the lectures and in Readle tot Study the provided source code so thoroughly that you could have written it. At this point, you can focus on the files fs3tyses.tep and thet1,_rpothen, answer the iternized questions below in a file named answers. tut. s4 2nwex. Hazan 1. The following are standard libeary routines: dup2, crest, pipe, fork, pthread_create, systen, printt Look up their functionality in both the Stevens' book and the on-lne man pages.. Describe their functionalty briefly, one sentence each, in your own words. 2. In the fle shell,cpe. what is the point of the last line of the function insiecief? 3. Learn to Use GDB Coming into the course, you are expected to be comfortable with est. Debugging large programs requires the construction of (extra) observer methods. Using es or some dether debugger is not as effective as invoking observers and studying their output in a peaceful place (under a free"). Nevertheless, got can be useful as a last resort, and you must be able to use it weil. 1. Start seriat. Make P0 as given. Pun our peogram P0 through gath. 2. Set a breakpoint at immediately after euin() Examine the values of but, are. types, stes while tracing down the code 3. Type in a commend to our shel, such as alfs si. Trace the execution from the above breakpoint onwards by single stepping until you reach the end of the fucntion twesirim. 4. Type in tis request and trace. Do you notice a diflerence? 5. End the script. Tum in this script as a flile named atsiesion, tat 4. Additions and Improvements Part of large program development is independentyy, but wisely, deciding what to do for certain "erronecus" situatons. Should we ask the profetsor for what to do for every possible error you can think of? IAnswer: No. You think about In. You take a reasonable action. You document this in your source code, and in mease, tst. And, be ready to defend your choice should it be questioned ] Remember that one of the goals of CEG 4331633 is to make you think about larger programs. Part of this is to supply missing, but needed, details in the probiom description. 4.0 What Is Given As given, the files of source tbr implement the following. tsu3s nikfs on creales an initialy empty file volume on the simulated disk named tu. di.. At this point, we do not need to discuss all the specifics anout the structure of the disk tracing down the cube 3. Type in a cemmand bo our shes, such as aati of. Trace the eapoution bom the above breakpont ofwards by single itepping und you reach the end of the tucriben anmbetat. 4. Type in 13s request and brach. Do yoy notce a difterance? 4. Additions and Improvements Fart of iage program development is independenty, but wisely, deciding what to do for cestan "emonecus" shuabons. Should we ank the protessor for what to de for every possble enor you cas hink of [Arwer Ho. You hink aboue re You take a peasonable abton. You dooument tis in your source code, and in meary.tat. And, be ready to delend your cheice should it te questioned] Peemembet that one of the goals of CEC 433633 is to make you tirk about larger progama. Part of this is bo supply missing, but needed, detall in the problem desoripoion. 4.0 What is Given As pien, the files of anersw.tar implement the folowing Hirs ehis 8 otbate an indialy empty fle volume on the simulaled bak named ts. dak. At deia point, we do not need to discint at the apectict anout he structure of the bick Fills is prints a lising. much liwe the Unic it -ltis, of at the fles in the meet directory of Be cume-t fae volume. 4.1 Redirection inglemant redirecten for the given shell as discused in dias. Use fie eparator s to redirect the ouput of a comnand into an fie on the hosfs file system. Ii is sale to assume that the sedirection eperacer appears only oece in the command line. 4.2 Piping inplement plping as dacuased in class for commands executed on the hos. For example, the eommand tie I liat axbeutes beth commands on the hote however, the piping needs to to ainta nuade cemmiencs. Bonut points are aralable if you achieve mutiple piging. 4.3 Executing in the background Alow your thee so soocula commarits in the fackground uting the 8 . The comimand prempt sheuld retum immed atoly after istuing the command no matter how long the execulon takes in is alale to askume that the character s orly apsears once in the coetmand. Your ahell should sugpor the execubion of al bpes of commandi in the backgound, ie, local commande coprating on the vitual file instem as well as corrmands nuning on the hoet. 4.4 A Simple Test Session Ony the adisional elements compared to the given source code are described below. Add these aperopnately bo the teit worpt. Ore pabt name syniax is the same as Unix path names. Cbviously. not every artibary sting it a vald path of name. Nho, the dot and the dot dot are not pemisubie as arguments in some corlasts below. Nerestheiess these commande must be robust. Fhits is o tast lats the contents of the cunent directory of our own sie system and redrects the output into the the sent of the local disction of the hosis the syalem. fuls in I teat ppes the eulput of is indo the local command at. leat tast whows the contents of the tie lest of the hosfs fie system (which should eonain the outeut of is if previcusly execised as abovel. Full talep 25 i waits 15 seoonde iance it is eapouted in the backgrosed the conmand prompt should be avalable immediately, though? 5. Turn in Al projects need so be luteminod via Pist Grading sheet for CEG 4350i5350: Operating Systems P1: Extending the Shell intructor + Thomai Wischooil: Eutra cresid points are awarfed in recogrition of pood work, and eatra work, in adsten to the sore. Some tems have a cascading eftect Only the additional elements compared to the given source code are described below. Add these appropriately to the test script. Our path name syntax is the same as Unix path names. Obviously. not every arbitrary string is a valid path or name. Also, the dot and the dot-dot are not permissible as arguments in some contexts below. Nevertheless these commands must be robust. fs 33: 1s > test lists the contents of the current directory of our own file system and redirects the output into the file test of the local directory of the host's file system. fsu3s is I teat pipes the output of is into the local command cat. fs33x teat test shows the contents of the file test of the host's flie system (which should contain the output of 13 if previously executed as above). fs33x Isleep 15 : waits 15 seconds (since it is executed in the background the command prompt should be available immediately, though). 5. Turn In All projects need to be submitted via Pilot. Grading Sheet for CEG 4350/5350: Operating Systems P1: Extending the Shell Instructor = Thomas. Wischgol:; Extra credit points are awarded in recognition of good work and extra work, in addition to the max possible points. Quality is subjectively judged. Merely turning in a file will not receive full score. Some items have a cascading effect
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
