Operating System (CS604)

Assignment # 01
Fall 2021

 

Total marks = 15

 

Deadline Date: 14/12/2021

 

Please carefully
read the following instructions before attempting the assignment.

RULES FOR MARKING

It should be clear that your assignment would not get any credit if:

  • The
    assignment is submitted after the due date.

  • The
    submitted assignment does not open or the file is corrupt.

  • Strict
    action will be taken if the submitted solution is copied from any other
    student or the internet.

 

You should consult the recommended books to clarify your concepts as
handouts are not sufficient.

 

You are supposed to submit your assignment in Doc or Docx format.

Any other formats like scan images, PDF, Zip, Rar, Ppt, and
Bmp, etc will not be accepted.

 

OBJECTIVE

The objective of this assignment is to provide hands-on experience of:

·        
Fork System call

·        
execlp system call

NOTE

 

Assignment No. 1 covers 1-7 lectures. No assignment will be accepted after the due date via email in any case
(whether it is the case of load shedding or internet malfunctioning etc.).
Hence refrain from uploading assignments in the last hour of the deadline. It
is recommended to upload the solution file at least two days before its closing
date.

 

Assignment Submission:

You are supposed to submit your assignment in .doc or docx format. Any other formats like scan
images, PDF, zip, rar, ppt and bmp etc will not be accepted.

Secondly, send the screenshot and C code of question no. 1, be pasted in
the same Word file.

 

 

If you find any mistake or confusion in the assignment (Question
statement), please consult with your instructor before the deadline. After the
deadline, no queries will be entertained in this regard.

 

For any query, whatsapp
03037155010

DOWNLOAD


Question No. 1                                                                                                                        
15 Marks    
 

 

Write the C Program in which the parent process will create
the child process using the fork() system call.

 

Following functionality be performed in the parent and child
process.

·        
In parent process you have to display your name,
roll no and academic program at Virtual University.

 

·        
In the child process you have to execute the binary
executable
“pwd” by using execlp() system call to display the current
working directory.

 

Following is the screenshot of your program, you have to
perform the following steps in your screenshot.

 

·        
In screenshot firstly compile your program.

·        
Then run the program.

Facebook
Twitter
LinkedIn
WhatsApp

Leave a Reply

Your email address will not be published. Required fields are marked *