A program which has the main process as Director process, which reads a file containing marks of all quizzes of all sections and creates x number of Manager processes. Each Manager process will take care of solving for a section. Each manager process will create y number of worker process and pass one quiz to each of them and they calculate and print the average.

There are x number of sections in a course. In each section y numbers of quizzes are conducted. The average for each quiz in all the sections needs to be found out.

Read x and y as input from the user. All quizzes are graded out of 20 points. Assume the number of students in all the sections is same and it is 10 per section. The input file should contain the data according to the value of x and y.

• The parent process is responsible for opening and closing the input text file. It stores the values in a two dimensional integer array with 10 rows.
• You may need to use the following C functions: fopen(), fscanf(), fseek(), fclose().

3 Years
Discussion Span
Last Post by richieking

With processes spawning processes, this hardly sounds like a simple assignment. And the hint your prof gave really doesn't even touch the tough parts.

Show some work, ask some questions, and we'll be glad to give some help. We won't do your work for you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.