Operating Systems Lab
Operating Systems Lab
DEPARTMENT OF CSE
VTU R15 B.TECH – CSE
SUMMER 2019-20
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.
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.
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 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.
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.