You are on page 1of 2

Assignment No.

01 Total Marks: 20
Semester: Spring 2020
CS604: Operating System Due Date: 02-06-2020

Instructions:
Please read the following instructions carefully before submitting the assignment. It should be
clear that your assignment 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)

Note: Lecture No. 1 to 6 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.

Objective:

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


 To learn and understand the basic concept of an Operating System
 To learn Directory Structure of Operating System

For any query about the assignment, contact at CS604@vu.edu.pk


Assignment
Assignment Questions:

Question No 1 12 Marks

The following figure shows the directory structure in a UNIX/Linux system. Suppose a user
Zulfiqar has a subdirectory Courses, under his home directory. This Courses directory contains
subdirectories for the different courses that he has taken for teaching i.e. (CS204 and CS604).
If Zulfiqar is currently in the Courses directory then write UNIX/Linux commands to perform
each of the following tasks.

1. How he can displays information about a current directory (including descendants) or


files; wildcards supported?
2. How he can change file access and modification times?
3. How he can change directory and refer to the directory for cs604 course?
4. Right after the login, how he can concatenate or display files?
5. How he can display the absolute pathname of his working directory?
6. How can he remove an empty directory under cs604 directory?

Solution
1. By using “ls” command
2. By using “touch” Command
3. By using “cd” command.
4. By using “cat” command
5. By using “pwd” command
6. By using “rmdir” command

Question No 2 08 Marks

Draw three state transition diagram of the following:

1. Diagram in which a process completes its execution with in its time line.
2. Diagram in which process never block itself / never get blocked and completes its
execution.

Solution:
1.

2.

Best of Luck

You might also like