Shell Scripting, Processes and Scheduling
Shell Scripting, Processes and Scheduling
Assignment: 1
Instructions:
1. Assignment must be attempted individually, acquire help from books and the world of internet
considering Teachers and class fellows unaware of OS.
Scheduling:
1. Write the C program for any one of the following scheduling algorithms. Time should be
taken in float.
b. Round Robin
Processes:
2. Write a c program which will fork child process according the following tree.
a. Parent process A will wait for all child process to
complete.
b. Child process B will execute a shell script by passing 2
arguments. (shell script would perform addition,
subtraction, multiplication and division of that numbers)
c. Child Process C sleeps 5 second and waits for its child to
complete.
d. Child process D runs a shell script which asks user to
enter his name, batch and id.
e. Child Process E calls exec to display mac address.
f. Child process F prints pid of his grandparent.
g. Child process G prints his own pid.
Shell scripting:
3. Write shell script for questions given below.
Hint: Use ls, grep, mkdir, mv, copy, for loop, if, else, truncate, dd switch for conditions. In case
of any ambiguity, first check the command manual “man truncate, man dd etc”.
“Smart people learn from everything and everyone, average people from their experience
and stupid people already have all the answers.” Socrates
Give your Best