We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 25
SAVITRIBAI PHULE PUNE UNIVERSITY
L.Y.B.Se(Computer Scienee) Practical Examination, Mareh/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-1
Duration: 3 Hrs Max. Marks: 35
Q.1 Write the simulation program to implement demand paging and show the
page scheduling and total number of page faults according to the LFU page
replacement algorithm. Assume the memory of n frames.
Reference String :3.4,5,4.3.4.7,2,4,5,6,7.2.4.6 [13]
Q2 Write a C program to implement the shell which displays the command
prompt “myshell$”. It accepts the command, tokenize the command line and
execute it by creating the child process. Also implement the additional command
“typeline’ as
typeline +n filename —:- To print first n lines in the file.
typeline -a filename — :- To print all lines in the file, [Is]
Q3. Oral/Viva {05}
Slip No-1 —SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Sc.(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-1
Duration: 3 Hrs Max. Marks: 35,
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the FIFO page
replacement algorithm. Assume the memory of'n frames
-eference String 354,'5,6,3,4, 7,3, 4,3.6,75254,6 [15]
Q.2 Write a program to implement the shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following “list” commands as
myshell$ list fdirname —:- To print names of all the files in current
directory.
myshell§ list n dirname :- To print the number of all entries in the current
directory [15]
Q.3. Oral/Viva {05}SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Se.(Computer Seience) Practical Examination, March/October
(2019 Pattern)
C8-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35
Q.1 Write the simutation program to implement demand paging and show the page
scheduling and total number of page faults according to the LRU (using
counter method) page replacement algorithm. Assume the memory of n
frames.
Reference String: 3,5,7,2,5,1,2,3,1,3,5,3,1,6,2 {1s}
Q.2 Write a programto implement the toy shell. It should di
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following commands.
lay the command
count ¢ filename — :- To print number of charaeters in the file.
count w filename — ;- To print number of words in the file
count! filename —:- To print number of lines inthe file. [15]
Q.3. Oral/Viva [05]SAVITRIBAI PHULE PUNE UNIVERSITY
lion, March/October
T.Y.B.S¢.(Computer Science) Practical Examin:
(2019 Pattern)
8-357 Lab Course-I Operating System-1
Duration: 3 Hrs Max. Marks: 35
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the MFU page
replacement algorithm. Assume the memory of n frames
Reference String : 85,7, 8, 5, 7,2, 3, 7, 3, 5,9, 4, 6,2 [15]
Q.2 Write a program to implement the shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following commands.
myshell§ search a filename pattern :- To search all the occurrence of
pattern in the file.
myshell8 search ¢ filename pattern :- To count the number of occurrence
of pattem in the file. [15]
[05]
Q.3. Oral/VivaSAVITRIBAI PHULE PUNE UNIVERSITY
ion, March/October
T.Y.B.Sc.(Computer Science) Practical Exami
(2019 Pattern)
‘CS-357 Lab Course-I Operating System-I
Max. Marks: 35
Duration: 3 Hrs
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the optimal page
replacement algorithm. Assume the memory of n frames
Reference String = 8,5, 7,85, 7,23, 7,3,5,9,4,6,2 [15]
Q.2 Write a program to implement the shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following commands
myshell§ search f filename pattern :- To display first occurrence of
pattern in the file.
- To count the number of occurrence
[15]
myshell§ search ¢ filename pattern
of pattern in the file
[05]
Q.3. Oral/VivaSAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Sc.(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35,
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the MRU page
seplacement algorithm. Assume the memory of n frames.
Reference String Be Se By tate te Fite a in Ook {15}
Q.2 Write a programto implement the shell. It should display the command prompt
“myshell$”. Tokenize the command line and execute the given command by
creating the child process. Additionally it should interpret the following
commands,
myshell§ search f filename pattern :- To display first occurrence of
pattern in the file.
imyshell search a filename pattern ;- To search all the occurrence of
pattern in the file, [15]
Q.3. Onll/VivaSAVITRIBAI PHULE PUNE UNIVERSITY
T-.Y.B.Se.(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS8-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35,
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the Optimal page
replacement algorithm. Assume the memory of n frames.
Reference String 7, 5,4,8, 5, 7, 2,
3,1,3,5,9,4,6,2 (s]
Q.2 Write a program to implement shell. It should display the command prompt
“mnyshell$”. Tokenize the command line and execute the given command by
creating the child
process. Additionally it should interpret the following
commands
myshel!§ search a filename pattern :- To search all the occurrence of
pattern in the file
myshell§ search ¢ filename pattern :- To count the number of occurrence
of pattem in the file. [15]
Q.3. Oral/Viva (05)SAVITRIBAI PHULE PUNE UNIVERSITY
(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max, Marks: 35
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the LRU page
replacement algorithm. Assure the memory of n frames.
Reference String 8,5,7,.8,5; 52,3, 7, 3,5, 9, 4,6, 2 [15]
Q.2 Write a programto implement the shell. It should display the command prompt
“myshell$”. Tokenize the command line and execute the given command by
creating the child process. Additionally it should interpret the following
commands,
myshell$ search f filename pattern :- To display first occurrence of
pattern in the file,
myshell$ search ¢ filename pattern ;- To count the number of occurrence
of pattern in the file. [15]
Q.3. Oral/Viva [05]SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Se.(Computer Science) Practical Exat n, March/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the FIFO page
replacement algorithm. Assume the memory of n frames.
Reference String 8, 5,7,8,5,7,2,3,7,3,5,9,4,6,2 [15]
Q.2 Write a program to implement the shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should
interpret the following commands
myshell$ search f filename pattern :- To display first occurrence of
pattern in the file.
myshell$ search a filename pattern :- To search all the occurrence of
pattern in the file. [5]
Q.3. Oral/Viva [05]
--Slip No-9-SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Se(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS-357 Lab Course-I Operating §
Duration: 3 Hrs Max. Marks: 35
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the FIFO page
replacement algorithm. Assume the memory of n frames.
Reference String 2,4,5,6,9,4, 7,3, 4,5, 6,7,2,4,7,1 [15]
Q.2 Write a program to implement the shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following
commands as
myshell$ list dirname :- To print names of all the files in current
directory
myshell$ list i dirname :- To print names and inodes of the files in the
current directory. [15]
Q3. Oral/VivaSAVITRIBAI PHULE PUNE UNIVERSITY
‘T.Y.B.Sc.(Computer Science) Practical Examination, March/October
(2019 Pattern)
‘CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks:
5
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the LFU page
replacement algorithm. Assume the memory of n frames.
Reference String 3,4, 5,6,3,4,7,3,4,5,6,7,2,4,6 [15]
Q.2 Write a C program to implement the shell. It should display the command
prompt “myshel
Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following ‘list’ commands as
myshell$ list fdirname _:- To print names of all the files in current
directory.
myshellS list n dirname :- To print the number of all entries in the current
directory U5]
Q3. Oral/Viva [05]SAVITRIBAI PHULE PUNE UNIVERSITY
‘T.Y.B.Sc.(Computer Science) Practical Examination, Mareh/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35,
Q.I Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the LRU page
replacement algorithm. Assume the memory of n frames
Reference String: 3,4, 5,6,3,4,7,3.4,5,6,7,2,.4.6 [15]
Q.2 Write a program to implement the shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following ‘list’ commands as
myshell$ list fdirname —:- To print names of all the files in current
directory
myshell$ list n dirname :- To print the number of all entries in the current
[1s]
directory
[05]
Q.3. Oral/VivaSAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Sc.(Computer Science) Practical Examination, March/October
(2019 Pattern)
stem-I
Lab Course-I Operating Sy
Duration: 3 Hrs Max. Marks: 35,
Q.1 Write a C program to implement the shell which displays the command
prompt “myshell$”. It accepts the command, tokenize the command line and
execute it by creating the child process. Also implement the additional
command ‘typeline’ as
]
typeline -a filename :- To print all lines in the file ae
Q.2 Write the simulation program for Round Robin scheduling for given time
quantum. The arrival time and first CPU-burst of different jobs should be input
to the system, Accept no. of Processes, arrival time and burst time. The output
should give the Gantt chart, turnaround time and waiting time for each
process. Also display the average turnaround time and average waiting time
[15]
Q.3. Oral/Viva [05]
Slip No-13—~SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Se.(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hes Max. Marks: 35,
Q.1 Write aC program to implement the shell which displays the command
prompt “myshell$”. It accepts the command, tokenize the command line and
execute it by creating the child process. Also implement the additional
command “typeline’ as
typeline +n filename == To print first lines in the file. [15]
Q.2 Write a C program to simulate Non-preemptive Shortest Job First (SIF)
scheduling. The arrival time and first CPU-burst of different jobs should be
, arrival time and burst time. The
input to the system. Accept no. of Process:
ting time for each
output should give Gantt chart, turnaround time and w!
process. Also find the average waiting time and turnaround time [15]
Q.3. Onl/Viva [0s]SAVITRIBAI PHULE PUNE UNIVERSITY
‘T.Y.B.Se.(Computer Science) Practical Examination, Mareh/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35
Q.1 Write a C program to implement the shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following ‘list’ commands as
myshell$ list {dirname :- To print names of all the files in current directory.
[15]
Q.2 Write the program to simulate preemptive Shortest Job First (SIF)
scheduling. The arrival time and first CPU-burst of different jobs should be
input to the system. Ac ses, arrival time and burst time. The
ept no. of Proc
output should give Gantt chart, turnaround time and waiting time for each
process. Also find the average waiting time and turnaround time [15]
Q3. OrallViva [05]SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Sc.(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35
Q.1 Write a programto implement the toy shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following commands.
counte filename — :- To print number of characters in the file.
count w filename — :- To print number of words in the file. [15]
Q.2 Write the program to simulate Non preemptive priority scheduling. The
arrival time and first CPU-burst of different jobs should be input to the
system. Accept no. of Processes, arrival time and burst time. The output
should give Gantt chart, turnaround time and waiting time for each process
Also find the average waiting time and turnaround time (15]
Q.3. Oral/Viva [0s]SAVITRIBAI PHULE PUNE UNIVERSITY
.Se.(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35,
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the Optimal page
replacement algorithm. Assume the memory of n frames,
Reference String EEA SS, GEE 18 59,46, [15]
Q.2 Write the program to simulate FCFS CPU-scheduling. The arrival time and
first CPU-burst of different jobs should be input to the system. Accept no. of
Processes, attival time and burst time. The output should give Gantt chart,
turnaround time and waiting time for each process. Also find the average
waiting time and turnaround time. (15]
Q.3. Oral/Viva [05]SAVITRIBAI PHULE PUNE UNIVERSITY
‘T.Y.B.Se.(Computer Science) Practical Examination, Mareh/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35
Q.1 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the LRU page
replacement algorithm. Assume the memory of'n frames
Reference String 3,4, 5, 6, 3, 4, 7, 3, 4, 5, 6, 7, 2, 4, 6 [15]
Q.2 Write a C program to simulate FCFS CPU-scheduling, The arrival time and
first CPU-burst of different jobs should be input to the system. Accept no. of
Processes, arrival time and burst time. The output should give Gantt chart,
turnaround time and waiting time for each process. Also find the average
waiting time and turnaround time. [15]
Q3. Oral/Viva [05]SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Se.(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS-357 Lab Course-} Operating System-1
Duration: 3 Hrs Max. Marks: 35
Q.1 Write a C program to implement the shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following ‘list’ commands as
myshell$ list {dirname :- To print names of all the files in current
directory [1s]
Q.2 Write the simulation program for Round Robin scheduling for given time
quantum. The arrival time and first CPU-burst of different jobs should be input
to the system, Accept no. of Processes, arrival time and bursttime. The output
should give the Gantt chart, turnaround time and waiting time for exch
process. Also display the average tumaround time and average waiting time,
[15]
Q.3. Oral/Viva [05]SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Se.(Computer Science) Practical Examination, March/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35
Q.1 Write a C program to implement the shell which displays the command
prompt “myshellS”. It accepts the command, tokenize the command line and
execute it by creating the child process. Also implement the additional
command “typeline” as
typeline-a filename — ; To print all lines in the file. [1s]
Q2 Write the program to simulate Non-preemptive Shortest Job First (SIF)
scheduling. The arrival time and first CPU-burst of different jobs should be
input to the system. Accept no. of Processes, arrival time and burst time. The
output should give Gantt chart, tumaround time and waiting time for each
process. Also find the average waiting time and turnaround time [15]
Q.3. Oral/Viva [05]
Slip No-20 ~SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Se.(Computer Science) Practical Examination, March/October
(2019 Pattern)
lem-T
CS-357 Lab Course-I Operating §
Duration: 3 Hrs Max. Marks: 35
Q.1 Write a C Program to create a child process using fork (), display parent and
child process id. Child process will display the message “I am Child Process”
[15]
and the parent process should display “Iam Parent Proc
Q.2 Write aC program to simulate Preemptive Priority scheduling. The arrival
time and first CPU-burst and priority for different n number of
processes should be input to the algorithm. Assume the fixed 10
waiting time (2_units). The next CPU-burst should be generated randomly. The
output should give Gantt chart, turnaround time and waiting time for each
process, Also find the average waiting time and turnaround time. [15]
Q.3. Oral/Viva [05}SAVITRIBAI PHULE PUNE UNIVERSITY
‘T.Y.B.Sc.(Computer Science) Practical Examination, Mareh/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35
Q.I Write a C program that demonstrates the use of nice() system call. After a
child Process is
started using fork (), assign higher priority to the child using
nice ()_ system call [15]
Q.2 Writea C program to simulate Non preemptive priority scheduling. The
arrival time and first CPU-burst of
ifferent jobs should be input to the
system. Accept no. of Processes, arrival time and burst time. The output
should give Gantt chart, turnaround time and wa
ing time for each
process. Also find the average waiting time and turnaround
time. [15]
Q3. Oral/Viva [05]SAVITRIBAI PHULE PUNE UNIVERSITY
(Computer Science) Practical Examination, March/October
(2019 Pattern)
cs-
Duration: 3 Hrs Max. Marks: 35
57 Lab Course-I Operating System-
Q.1 Write aC program to illustrate the concept of orphan process, Parent process
creates a child and terminates before child has finished its task. So child
process becomes orphan process. (Use fork(), sleep(), getpid(), getppid()).
[15]
Q.2 Write the simulation program for demand paging and show the page
scheduling and total number of page faults according the Optimal page
replacement algorithm, Assume the memory of n frames.
Reference String : 7,5, 4,8,5, 7,2, 3, 1,3,5,9, 4,6, 15]
Q.3. Oral/Viva 05]SAVITRIBAI PHULE PUNE UNIVERSITY
T.Y.B.Se.(Computer Science) Practical Examination, March/October
(2019 Pattern)
Cc
57 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35,
Q.1 Write aC program to accept n integers to be sorted. Main function
creates child process using fork system call, Parent process sorts the integers
using bubble sort and waits for child process using wait system call. Child
process sorts the integers using insertion sort, [Is]
Q.2. Write a C program to implement the toy shell. It should display the command
prompt °
shell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret the
following commands.
counte filename - To print number of characters in the file.
count w filename — :- To print number of words in the file.
count! filename — :- To print number of lines in the file. [15]
Q.3. Oral/Viva [05]SAVITRIBAI PHULE PUNE UNIVERSITY
‘T.Y.B.Se.(Computer Science) Practical Examination, Mareh/October
(2019 Pattern)
CS-357 Lab Course-I Operating System-I
Duration: 3 Hrs Max. Marks: 35
Q.1 Write a C program that aecepts an integer array. Main function forks child
process. Parent process sorts an integer array and passes the sorted array to
child process through the command line arguments of exeeve() system call.
The child process uses execve(} system call to load new program that uses this
sorted array for performing the binary search to search the particular item in
the array. [15]
Q.2 Write a programto implement the shell. It should display the command
prompt “myshell$”. Tokenize the command line and execute the given
command by creating the child process. Additionally it should interpret
the following commands.
myshell§ search f filename pattern :- To display first occurrence of
pattern inthe file. [15]
Q3. Oral/Viva [05]