Third FAQ

for

Project 1 -- Standard I/O and Device Drivers

Q. It looks like cs unix kernel doesn't provide none of time or clock. even if i just " ask" to print out time it prints 00000000000. time is our enemy.

A. I have had no problems using the times() system call (mentioned in the assignment and previous FAQ's) on turing, bachman, or any of the several gpel machines that I have tried. Please provide more detailed information when you send in questions.


Q. Are you saying that i have to use fork() command in proj1?

A. I recommend that you don't use fork() for project 1. There is really no need to use fork() and doing so will only make your program more complicated and confusing.

You will, however, use fork() in project 2.


Q. Can U please tell me as to how to check whether a file already exists there or not??I did try the O_CREAT|O_WRONLY........... and also using if(!f2)or if(f2)(f2 being the pointer of the file to be written) but i could see it work for me. IS there any specific command for us to check this one??LEt me know of that.

A. This was covered in a previous FAQ. Please read the FAQs before sending in questions.


Q. I was wondering if instead of timing JUST character output procedure in all the six parts of the project I could measure time of "shell using" by an entire running programm that is with all the file opens , loops and other structures. Since all of those components are common to all six parts i thought that this strategy would be OK, because we need comparative(relative) measurments, not absolute, right? After doing so I can analyze gotten data in the writing part of the project. Please inform.

A. No, as I have indicated in the assignment and the previous FAQs, what you want to measure is the time to write out the file (to standard out or to a file) and nothing else.


Q. For all the six programs the output is very large. And if i print it out then my hardcopy will be very large. So do i have to print out so many data.

A. You need to print out the data as well as your write up. The data do not include the print outs of the file you are writing to get your time measurements. The data may be formatted to minimize the space required, as long as it is easily readable.


Q. is there a way to attatch a file from my unix account to an email utility(mutt) and send it to my ou webmail???

A. You can either use mutt interactively and attach a file that way (the default key to press is "a" for "attach" although this can be reconfigured to any key you choose) or from the command line (similar to the instructions for submitting your project electronically). You can send groups of files as a single file by combining them with tar, but then you need tar on the other end to extract them. You can also send individual files of any type, each as a separate attachment.