Here is your Lab 3.
Lab 3 is graded and you need to submit your answers to IVLE workbin using the template provided. Please read the instructions carefully.
Lab 3 is due on Friday, 9 September 2011, 11:59pm.
Here is your Lab 3.
Lab 3 is graded and you need to submit your answers to IVLE workbin using the template provided. Please read the instructions carefully.
Lab 3 is due on Friday, 9 September 2011, 11:59pm.
I can`t find any workbin under CS2106 in my IVLE. Is this system error? Thanks
I just created the folders.
Did not expect you to finish the lab so fast :P
Are we allowed to access the OS lab at any time? I’m just wondering of how to get started on the lab assignment. Thanks!
@Man Yau,
Yes, the OS lab is accessible via your student card 24 hours, 7 days a week.
Hi prof,
In question 3, subpart (a) what’s exactly do you mean when you say “What processes constitute the process group created? Which process is the leader?”
Do we give the process IDs of the processes?
Process IDs change from run to run, so simply giving the process IDs is not a good enough answer.
Do we need to make it runs exactly 1000 times? I think 1024=2^10 is easier.
oh, sorry, never mind that, just ignore my question.
When we run this piece of code:
for (i = 0; i < 3 ; i ++ )
{
if (fork()==0)
printf("a \n");
return;
}
The output is a.
However, when change to fork()==1. There is no output.
Am i right to say that when there is no parent-child process created ( using fork() ), each individual process is deemed as "child" by the system?
No, fork returns you the process ID, both to the parent and the child.
to the parent it passes the id of the child that was created, and to the child it passes 0.
when you are testing for fork() == 1 you eventually are trying to check whether the process is an init process which is executed during system start.