Operating System Sem II Pattern 2020 Endsem Exam May 2023 - Computer

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

few.. , ;.

u:v^V ^--vV,
•• •■;■' v-^ rU'
"'V,i

Total No. of Printed Pages:[02]


Total No. of Questions - [03]
IT; Ui' »

PAPER CODE
G.R. No. UZ-'Z^'^ ^^*7
•' **

> \ V

May 2023 (ENDSEM) EXAM


■i>,-ji/'f. :• .\
.) \ "<■ S.Y. B.TECH (COMPUTER ENGINEERING)
(AY 2022-23 SEMESTER - II)
•• ( t . ■ ■ !'

COURSE NAME: OPERATING SYSTEM


l^o!!^;:iiU':i
COURSE CODE: CSUA22204
(PATTERN 2020)
W icu),'' o [Max. Marks: 30]
:'v.»
Time; [IHr]
W^: 7 > :# •fSr
Instructions to candidates:
\kM
1) Use of scientific calculator is allowed
2) Use suitable data where ever required 1

3) All questions are compulsory


^^■11 ■ . ' ■.,.■•> Question Question Description
Max.
Marks
CO
mapped
BT
Level
Ubll25;3

No.
and counting [4] C04 [Understand]
Q.l
semaphores with clear descriphon of their
ityiUs usability

iff
usaouity —^
and describe [61 C04 [Apply!
i|
Vilfcl
possible outcomes of the same.
O #inc!ude <stdio.h>
#include <assert.h>
#include<pthread.h>

inS) void .mythread(void -arg)


{
CORE i3
7th Gen
printf("%s\n",(char.)arg);
return NULL;
}
Int main(int argc, char *argv[])
{
1 i
f I pthread_t pi, p2;
ti '
I I i { ' i
int rc;
Hil printfC'main: begin\n");
vt/:
rc= pthread_create(&pl, NULL, mythread, "A");
'4 ') , assert(rc == 0);
rc= pthread_create(&p2, NULL, mythread, "B");
assert(rc == 0);
v-y ■ -Ti ••'I'l
rc = pthreadJoin(pl, NULL);
assert {rc==0);
rc = pthreadJoin(p2,NULL);

■ 'I

h'vT.oy,
^ t /I
assert(rc==0);
printfC'main: end\n");
return 0;

OR
c) Consider the following snapshot of a system: [6] [ C04 [Apply]

Allocation Max Available


Processes
ABC ABC ABC
Po 1 1 2 4 3 3 2 1 0
Pi 2 1 2 3 2 2

P2 4 0 1 9 0 2

P3 0 2 0 7 5 3
n 1 1 2 1 1 2
P4
I) Calculate Need Matrix
II) Is the system in a safe state use Bankers
Algorithm

a) Describe the step by step process of [4] [COS] [Understand]


writing to the file.
b) Consider a disk queue with requests for I/O to [6] [COS] [Apply]
blocks on cylinders 98, 183, 41, 122, 14, 124, 65,
67. The head is initially at cylinder number 53.
The cylinders are numbered from 0 to 199. Apply
FCFS Disc scheduling algorithm and show the
servicing of the requests with the total head
movement (in number of cylinders) incurred
while servicing these requests.
OR
c) Consider the given disk request sequence for a [6] [COS] [Apply]
disk with 100 tracks as 45, 21, 67, 90, 4, 89, 52,
61, 87, 25, with head pointer starting at 50. Apply
SSTF Disc scheduling algorithm and show the
servicing of the requests with the total head
movement (in number of cylinders) incun'cd
while servicing these requests.

a) Explain Little's Law with example. [006] [Understand]


[4]
b)"Using Checksum increases the time and space [6] [C06] [Apply]
overheads for the storage systems" Do you agree
with above statement. Justify your answer.
OR
c)"Checksums are useful in preserving the data [6] [C06] [Apply
integrity" Examine the above statement with
example.

You might also like