Skip to main content

CS604 Assignment No. 01 solution Semester: Fall 2017

Assignment No. 01Semester: Fall 2017

Operating Systems (CS604)

Instructions:                          
Please read the following instructions carefully before submitting assignment:
§  You should submit your assignment before or on due date on VULMS.
§  Your assignment should be your own work in your own words. It should not be copied from Internet, handouts or books.
§  Assignment sent via Email will not be replied and accepted.
§  If the submitted assignment does not open or file is corrupt, it will not be marked and hence awarded zero marks.
Objectives:
·         To know about how to create processes and terminate processes in Linux.
·         To learn how to use inter process communication tools.
·         To learn how to write, compile and execute basic program in C using gcc.
                                                   


Question:
Problem Statement:
You are required to write a simple C language program to:

  1. Create a process using fork call
  2. Get and print status information of the running processes
  3. Use pipe call for inter-process communication between processes
  4. Terminate process
  5. Compile & run C program on Linux Operating system.

Detailed Description:

In the main() function, first of all you will establish a channel for processes to communicate through pipe system call. After successful creation of pipe, you will create child process through fork() system call.

In the child process, you will have to display your own student Id through the pipe or channel established between processes. In the parent process, you will have to display your own student name through the pipe or channel established between processes.

You will also print the status information of Parent and Child process by using user-defined function printInfo(). The status information includes Process Id and Parent Id in case of Child process and Process ID and Child Id in case of Parent process

Compilation & Execution of Program:

You will compile your file with your student ID. For example, if your student ID is BC123456789 then you will compile the code according to following screenshot.

Note:  File name other than your Student ID will not get marks.

You will write code and paste following two screenshots in word file.

1)      You will take screenshot of compiling command that you will issue.
2)      Then you will run your executable and take its screenshot.

Sample Output for program 

Guideline:
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.

Follow the tutorial to download Virtual Box form the following link:

Then download Ubuntu Linux from the following link

Then follow these tutorials to install Ubuntu Linux in Virtual Box

Note: You have to send only Word file which contains C code and screenshots of output.  File other than Word file will not be accepted.




                                    Click Here For Download
















Comments

Popular posts from this blog

VU all subjects mid term past papers

All Subjects Mid Term Solved Past Papers Select Your Subject And Download Mid Term Past Papers (Solved Mega Files). All Computer Science  [CS]  Subjects. CS 101    CS 201    CS 301    CS 302    CS 304    CS 401    CS 402    CS 403    CS 408    CS 501    CS 502    CS 504    CS 506    CS 508   CS 510    CS 601    CS 602    CS 604    CS 605    CS 606    CS 607    CS 609    CS 610    CS 614    CS 615 All Economics  [ECO]  Subjects. Eco 401   Eco 402 Eco 403   Eco 404 All English  [ENG]  Subjects. Eng 101   Eng 201   Eng 301   Eng 401 All Finance  [FIN]  Subjects. Fin 611   Fin 621   Fin 622   Fin 623   Fin 624  ...

CS304 Assignment No: 02 fall 2017

CS304 Object Oriented Programming Assignment No. 02  Instructions: Please read the following instructions carefully before submitting assignment: It should be clear that your assignment will not get any credit if: 1. The assignment is submitted after due date. 2. The assignment is submitted via email. 3. The assignment is copied from Internet or from any other student. 4. The submitted assignment does not open or file is corrupt. 5. It is in some format other than .cpp. Note: You are supposed to submit your assignment in .cpp format. Any other formats like scan images, PDF, zip, doc, rar and bmp etc will not be accepted. All types of plagiarism are strictly prohibited. Objective The objective of this assignment is: 1. To give you the idea of practical implementation of some concepts like, definition of classes, Data members, member functions, Constructors, Composition etc . For any query about the assignment, contact at cs304@vu.edu.pk GOOD ...

Download All VU Subjects Complete Handouts in PDF Files

Download All Your subjects handouts And Short Notes: you can download your subjects handouts And Short Notes from our website VU Help Center ACC - Fundamentals of auditing and business ACC311 ACC501 Final Project & Internship Report - Accounting & Finance ACF619 ACFI619 BIF- Bioinformatics I & II BIF401 BIF402 BIF501 BIF601 BIF731 BIF732 BIF733 BIO- Basic I-Biology BIO101 BIO102 BIO201 BIO202 BIO203 BIO204 BIO301 BIO302 BIO303 BIO502 BIO503 BIO601 BIO731 BIO732 BIO733 BIO734 BIT-Introduction to Programming BIT701 BIT703 BIT710 BIT715 BNK-Banking Laws & Practices BNK601 BNK603 BNK604 BNK610 BNK611 BNK612 BNK619 BNK620 BNK701 BNK703 BNK704 BNK725 BNKI619 BNKI620 BT- Ecology,Biodiversity & Evolution BT101 BT102 BT201 BT301 BT302 BT605 BT720 BT731 BT732 BT733 BT734 BT735 CHE-Physical Chemistry CHE201 CHE301 COM6-Final Project & Internship Repor...