Вы находитесь на странице: 1из 3

SCHOOL OF COMPUTING

DEPARTMENT OF CSE
VTU R15 B.TECH – CSE
SUMMER 2019-20

Course code & Title: 1151CS108 & OPERATING SYSTEMS


Course Category: Program Core Slot: S1,S2
Faculty Name: S. Saran Raj

1151CS304 OPERATING SYSTEMS LAB

Task 1: Unix Commands

a) Create a new user with 10025 as user id.


b) Create a directory and give permission to access only by the group of users created by
admin.
c) List all the processes and write those processes in single file.
d) Using grep command search the entire root directory with the name ls and print the
output to output.txt file

Task 2: Shell Programming

a) Write a shell script that verifies the printed prime number from 1 to 100 is correct or
not.
b) To write a shell program to concatenate two strings.
c) Write a script to check and compare the two files and print the result.

Task 3: Process Management

a) Write a C program to create a process that process creates child process and get the
input from user to compute the palindrome and return the output as success if the
given text is palindrome otherwise send the result as failure.
b) Write a C program to list the current processes working in background and list the
details about who created that process and list all the attributes related to that process.

Task 4: System Calls

a) List the system calls that support copying file from one place to another in different
directory and write a C program to copy the file along with test cases to find and
display the type of interrupt incase of failure.

Task 5: CPU Scheduling


a) Write a C program to implement Shortest Remaining Time First (SRTF) Algorithm
for the given Processes and Print the Gantt Chart, Average Waiting Time and Average
Turn Around Time.

Processes CPU Burst Time Arrival Time


P1 7 0
P2 5 1
P3 3 2
P4 1 3
P5 2 4
P6 1 5

Task 6: Deadlock Avoidance


Create a simulator to implement Banker’s algorithm for deadlock avoidance with allocation
of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given below
presents the current system state. Here, the Allocation matrix shows the current number of
resources of each type allocated to each process and the Max matrix shows the maximum
number of resources of each type required by each process during its execution.

Task 7: Inter Process Communication


a) Write a C program to create a parent process that communicates with child process
through memory sharing.

Task 8: Semaphores

a) Solve the following problem using Semaphores: we have a buffer of fixed size. A
producer can produce an item and can place in the buffer. A consumer can pick items
and can consume them. We need to ensure that when a producer is placing an item in
the buffer, then at the same time consumer should not consume any item. In this
problem, buffer is the critical section.

Task 9: Page Replacement

a) Implement the Optimal Page Replacement algorithm in C Language.

Task 10: Disk Scheduling

a) Given an array of disk track numbers and initial head position, task is to find the total
number of seek operations done to access all the requested tracks if Shortest Seek
Time First (SSTF) is a disk scheduling algorithm is used. Derive an algorithm and
code the same in C Program.

Task 11: File Allocation Strategies

a) Write a C program to simulate the following file allocation strategies. a) Sequential


b) Linked

Task 12: File Organization Techniques

a) Write a C program to simulate the following file organization techniques a) Single


level directory b) Two level directory c) Hierarchical

Вам также может понравиться