CS6560 Operating System Design

CS 6560 – Operating System Design

Programming Assignment 1

You are to use the UNIX environment to write two C programs as follows:

1. Simulate the UNIX utility time that shows the time taken by a program. Your command line syntax should be as follows: (mytime command). This program should invoke a program which gets the CPU time, forks a child to run command and when the child returns gets the CPU time again and prints the difference between the two times.

2. Use sigaction and pause to write a function that simulates the sleep function.

Both programs MUST be written in C on UNIX. Access to the CSUEB Unix server will be provided.

Note: DO NOT copy or use ANY source code found on the Internet or from other sources. Write the source code yourself, from scratch. Any code copied or modified from the Internet or other sources will NOT receive credit. DO NOT work together with other students. Any students turning in the same or modified versions of the same source code will NOT receive credit. This assignment can ONLY be submitted one time for credit.

Answer Detail

Get This Answer

Invite Tutor