$24
Instructions:
Assignment must be attempted individually, acquire help from books and the world of internet considering Teachers and class fellows unaware of OS.
Scheduling:
Write the C program of the given scheduling algorithms in problem. Considering the condition given in above problem parts. Time should be taken in float. You are allowed to assume other parameters to bring efficiency in scheduling algorithms
Processes:
Write a c program which will fork child process according the following tree.
Parent process A will wait for all child process to complete.
Child process B will execute a shell script by passing 2 arguments. (shell script would perform addition, subtraction, multiplication and division of that numbers)
Child Process C sleeps 5 second and waits for its child to complete.
Child process D runs a shell script which asks user to enter his name, batch and id.
Child Process E calls exec to display mac address.
Child process F prints pid of his grandparent.
Every child process should display current date and time.
Write a program to implement bidirectional pipe using unnamed pipes.
Shell scripting:
Write shell script for questions given below.
Display how to login email from terminal using any script.
Write a shell script to rename file having extension sh to exe.
Write a shell script to examine all the number from 1 to 999 and display all those number whose sum of cube of the digit is equal to the number. e.g. 371 = 3*3*3+7*7*7+1*1*1
Is there a concept of pointers in sell script? Describe if either Yes or No.
Write a script to find out String is palindrome or not.
Write a scripts which copies the content of file1 to file2 without using cp command. It should check if file has a read permission if not it should print an error message. If file2 exists, then it should ask the user whether he wants to overwrite it.
Write a shell script to list all the files of the current directory having read and write permission to the user.
Write a script, disk_usage.sh, that given a directory, the script lists the n largest directories or files. The disk_usage.sh script takes argument to print n largest folders or files. If not specified, assume 10.
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