Systems Software/Programming - Lab Manual
Systems Software/Programming - Lab Manual
Systems Software/Programming - Lab Manual
______________________________________________________________________________
Lab 3 – C Revision
Write C program for each of the problem below. After executing each of the C
program, you will need to capture the output in text file format.
C program file will be named as StudentID_Lab3_x.c
Text file with output captured will be names as StudentID_Lab3_x.txt
3. Write a c program StudentID_Lab3_3.c for this problem. You are given a task to
keep track of all the programs running on a computer. You are required to
implement a doubly linked list (non-circular) where in each node will store the
following program information and will have pointer to the next and previous
nodes. There will also be head and tail pointers pointing to first and last nodes
respectively.
struct program {
int prog_id; // program id
char prog_name[50]; // name of the program including full path
char uid_executing[25]; // user id who is executing the program
uint64_t start_time; // process start time using gettimeofday() system call
uint64_t time_elapsed; // time in microsecond program has been executing
int prog_status; // submitted, running, finish
}
Submission:
StudentID_Lab3.zip with total 6 files (3 C program files + 3 captured output text
files)