Looking at the template we have been given to write our project in we find these two functions.
void read_commands(char argv0[], char filename[])
{
}
// ----------------------------------------------------------------------
void execute_commands(void)
{
}
According to my understanding of the project, where we are just simulating the system calls, we really only care about the time it takes to execute a process and the time it is "running" for. For example,
ShortSleep
10usecs sleep 100000usecs
We are not actually making our system sleep but simulating that it took 10usecs for it to execute on the CPU and now it is off the CPU and in a blocked queue for another 100000usecs.
My question is, can I please have an example of how we can use these two commands. I thought having a loop that loops through each command and picking apart the times while comparing the name of the command (e.g. sleep and spawn) might do different things and we can add the times on CPU that way might be easier. Unless I am understanding the problem statement wrong. Thank you for your time.