CS604 - Operating Systems Assignment No. 2 Solution and Discussion Spring 2017 Due Date: May 22, 2017 

Assignment No. 02
Semester: Spring 2017
CS604: Operating System
Total Marks: 20
Due Date:22/05/2017
Instructions:
Please read the following instructions carefully before submitting the assignment. It
should be clear that yourassignment will not get any credit if:
 The assignment is submitted after the due date.
 The submitted assignment does not open or file is corrupt.
 Assignment is copied(partial or full) from any source (websites, forums,
students, etc)
Notes:
 Lecture No. 7 to 12 are covered in this assignment.
 You have to upload only .doc file. Assignment in any other format
(extension) will not be accepted and will be awarded with zero marks.
 All Ccodes and system calls should be in italic fonts.
Objective:
The objective of this assignment is to evaluate;
 Student understandings of basic concepts, environment of writing linux
system programs
 Student understanding basic linux commands to interact with linux
operating system using command line
 Understandings of the linuxInterprocess communications
 Student understanding of various system calls and c liberary calls related to
IPC used in writing linux system programs.
 Hands on experience of writing a basic c program to for process creation,
eastablishing communication between processes and compilations using the
GCC.
For any query about the assignment, contact at CS604@vu.edu.pk
Assignment
Assignment Questions:
Question#1: [20Marks]
You have studied various topics related to Linux process creation, process communications, input,
output and error redirection. You have also studied various shell commands used in Linux. Here you
need to utilize your knowledge and skills to write two short C programs VP and UP with following
information.
1. VP and UP each creates two child process vc1,vc2 and uc1,uc2 respectivly.
2. After the creation of these child processes VP and UP sends a message to vc1, vc2 and uc1,
uc2 respectively that I am going to close you carry on and the vc1, vc2, uc1 and uc2 continues
running.
Assignment Figure 1


Now you need to write a shell script to start and stop these programs with following functionalities.
 VP and UP should be started when users types … script.sh start VP or UP
 vc1, vc2, uc1,uc2 should be stoppable only using script.sh stop vc1 or vc2 or uc1 or uc2
 script.sh connect command should create two fifo and connect processes as shown in figure
You need to write above programs and send the code along with running snapshots.
Note: To solve the assignment you have to install Linux on your system. To install the Linux first
you have to install virtual Box in your system.
Download Virtual Box form
http://download.virtualbox.org/virtualbox/5.1.8/VirtualBox-5.1.8-11...
And install it, then download Ubuntu Linux from
http://de.releases.ubuntu.com/16.10/ubuntu-16.10-desktop-i386.iso
Then follow this tutorial to install Ubuntu Linux in Virtual Box
http://www.psychocats.net/ubuntu/virtualbox
Tutorial for writing Script in Shell “shell_scripting” file is attached to assignment folder. You can
take help from tutorial how to write the script in shell.
Best of Luck

Tags: -, 2, 2017, 22, Assignment, CS604, Date:, Discussion, Due, May, More…No., Operating, Solution, Spring, Systems, and

Views: 609

Attachments:

Replies to This Discussion

Assignment k bad ubuntu un install krna hai ya

We have to keep it for future...........

bhai agr kr li hai to share bhi karo yaar..

RSS

SPONSORED LINKS

SPONSORED LINKS

© 2017   Created by Irfan Khan MSCS.   Powered by

Badges  |  Report an Issue  |  Terms of Service