Sale!

Lab 4: System Calls Summary

$35.00

Category:
5/5 - (2 votes)

CSC 33200 (L) – Operating Systems
Lab 4: System Calls Summary

PART 1 Simple Command Interpreter
Write a special simple command interpreter that takes a command and its
arguments. This interpreter is a program where the main process creates a child
process to execute the command using exec() family functions. After executing
the command, it asks for a new command input ( parent waits for child). The
interpreter program will get terminated when the user enters quit.
Example:
./interpreter
command: pwd
 output
command: ls -la
 output
command: date
 output
command: quit
 terminates the program.
PART 2 Average Grade Calculator
There are 10 students enrolled in a course. The course covers x number of
chapters from a textbook (x > 1).
In each chapter y number of homeworks are assigned (y>=1). The average grade
for each homework in all the chapters need to be found out.
To solve this, write program which has the main process as Director process,
which reads a file containing grades of all homeworks of all chapters and creates x
number of Manager processes. Each Manager process will take care of solving
a chapter. Each manager process will create y number of Worker process and
pass marks of 10 students to each of them and they calculate and print the average.
The input file should contain the data according to the value of x and y. For
example, the input text file and the process tree for x = 2 and y = 2 will look like
the following:
X1Y1 X1Y2 X2Y1 X2Y2
Student1 19 17 20 18
Student2 9 6 10 9
Student3 12 11 10 6
Student4 3 7 9 10
Student5 0 5 8 6
Student6 15 13 15 15
Student7 20 18 18 16
Student8 17 19 19 18
Student9 13 15 14 12
Student10 10 13 18 15
Output: avg avg avg avg
Submission Instructions
• All the programs MUST be clearly indented and internally documented
• Make sure your programs compile and run without any errors
• Save all your programs with meaningful names and zip into a single
folder as: task1_[your last name here].zip (e.g., task1_Xyz.zip)
• Email your code with the subject line, “Task1-CSC33200(L)–Class#
12345-lastname” (e.g., Task1 – CSC33200(L)-Class #63858-Xyz)
• Do not include executables with the zip file during submission.
• Email: [email protected]
******
Office Hours: Tuesday 11:00 – 12:00 pm
Join Zoom Meeting
https://ccny.zoom.us/j/84269573672?pwd=SE9uNjM4V2FJTGZDU3lQdU5rdE5Odz0
9
Meeting ID: 842 6957 3672
Passcode: 842199
One tap mobile
+16465588656,,84269573672# US (New York)
+13017158592,,84269573672# US (Washington DC)
Dial by your location
+1 646 558 8656 US (New York)
+1 301 715 8592 US (Washington DC)
+1 312 626 6799 US (Chicago)
+1 346 248 7799 US (Houston)
+1 669 900 6833 US (San Jose)
+1 253 215 8782 US (Tacoma)
Meeting ID: 842 6957 3672
Find your local number: https://ccny.zoom.us/u/kdFSnm1j0
IMPORTANT NOTE: Please connect with zoom with a valid CCNY or
CITYMAIL email id. Please sign up with the CITYMAIL or CCNY email
address at : https://www.ccny.cuny.edu/it/zoom

PlaceholderLab 4: System Calls Summary
$35.00
Open chat
Need help?
Hello
Can we help?