السلام عليكم
ممكن أحد يقولي وش المطلوب من هالسؤال
هذا البرنامج بلغة C
int main()
{
pid_t pid;
/* fork another process */
pid = fork();
if (pid < 0) { /* error occurred */
printf("Fork Failed");
exit(-1);
}
else if (pid == 0) { /* child process */
printf ("I am the child ");
}
else { /* parent process */
printf ("I am the parent ");
}
}وهذا الطلب
We want to implement Producer/Consumer paradigm between parent and child processes created above. We have the following functions : - GenerateDate( ) : a function that return an integer. - Produce(x,Buffer) : the producer function. A function that places the integer x into Buffer - Consume(x,Buffer) : the consumer function. A function that takes the integer x from Buffer. Further, we want that both Producer and Consumer run forever i.e. each one should be placed within an infinite loop.
واللي يقدر يحله يساعدني لاني مااعرف لهاللغه

