0% found this document useful (0 votes)
7 views6 pages

CSE2008

Exam paper

Uploaded by

vareddy73382
Copyright
© © All Rights Reserved
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
0% found this document useful (0 votes)
7 views6 pages

CSE2008

Exam paper

Uploaded by

vareddy73382
Copyright
© © All Rights Reserved
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/ 6
VIT-AP upvc: UNIVERSITY Apply Knowledge. Improve Life! QUESTION PAPER INTER 2022-2023-CAT 1 Name of the Examination: Course Code: ¢5E2008 Course Title: Operating Systems Setnumber: 1 Date of Exam: 5-0) 2023 (Firv\C 1) Duration: 90 Minutes Total Marks: 50 Instruction: Answer ALL the questions. QL. Write short notes on following: a Virtualization b, Time sharing operating system [10 Marks] Q2. Assuming that the system call fork() never falls, consider the following C programs P1 and P2 executed on 2 Unix/Linux system: [10 Marks] ssPa*/ reat] int main(){ int main(){ fork(); fork(); fork); printf(*VIT-AP\n"); fork(); fork(); printi(*VIT-AP\n"}; printf(*"VIT-AP\n") fork(); printf("VIT-AP\n”) What is the output for the above-mentioned code and justify your answer with the process tree. Q3. Draw Gantt charts for the following set of processes using the following scheduling algorithms: (a) FCFS (b) SIF (Preemptive and Non-preemptive). Compute the walting time and turnaround time for each process assuming the context switch time as 0. What are the average values for waiting time and Turnaround time? How many context switching decisions are made in each case (not counting initial decision to give the CPU to PI)? [10 Marks] Page 1 of 2 Process | Burst Time | Arrival Time Pt 8 ° °2 5 1 P3 3 2 Pa 1 3 Ps 7 4 Q4. Assume the following processes that arrive for execution at the time indicated and also the length of the CPU burst time is given in ms, [10 Marks} Process | BurstTime | Priority | Arrival Time PL 0 | s 0 P2 6 2 o [ps 7 4 1 Pa ah let 1 Ps, 5 3 2 a) Give a Gantt chart illustrating the execution of these processes using Round robin (Quantum=5), and Priority (Preemptive and Non preemptive) 'b) Calculate the average TAT and WT for the above scheduling algorithm, QS. What are the two models of inter process communication? What are the strengths and weaknesses of the two approaches? [10 Marks] ‘QP MAPPING | Modute PO PEO No. | Number |COM=PPEd| yameq | meprea | PSOMapped | Marks Qi 1 1 42 1 i i0 a 1 T 12 1 7 10 a3 2 a 25 a 1234 40 a4 2 4 25 4 12,34 io | a5 2 2 i2A 23 12 10 Page 2 of2 VIT-A UNIVERSITY ‘Apply Knowledge. Improve Life!” QUESTION PAPER Name of the Examination: WINTER 2022-2023-CAT-1 Course Code: CSE-2008 Course Title: Operating System: setrumber: 3 pate ot exam: 14--02--2223 (PY) Duration: SoMtns rotelmarts:50 CE}) Instructions: 1, Answer all the Questions (Qi. 8) Explain in detail tho role of Operating system as a resource Manager. {SMI +) Discuss the essential properties of Time sharing and distributed systems. IM] (Q2. Consider the following code segment. fom] include #inolude int int main t printi('Hello\n"; fork(: for(i=0si #include int mainQ, { fork(); fork); forks printf("hello\n"); return 0; 3 What is the output of the program, and how many child processes are created during the execution of this program? Justify your answer. (5M) ) What is a System call? Explain the various types of system calls provided by an operating system, (5M) 2, Direct memory access is used for high-speed I/O devices in order to avoid increasing the CPU’s execution load. a, How does the CPU interface with the device to coordinate the transfer? b, How does the CPU know wien the memory operations are complete? ©. The CPU Is allowed to execute other programs while the DMA controllers transferring data, Does this process interfere with the execution of the user programs? If'so, describe ‘what forms of interference are caused. (om) 3, How cooperating processes can communicate in a shared-memory environment? Explain it with a solution to the producer-consumer problem of having a bounded buffer area, (10M) 4, Consider the set of $ processes whose arrival time and burst time are given below- Process Id [Arriva time Burst time | Priority 2 PL P2 3 Page 1 of 2 Process Id Arrival time Burst time | Priority P3 2 i | Hl 4 | P4 3 s | 8s PS 4 2 | 58 Calculate the average waiting time and average turnaround time for Priority scheduling preemptive mode and non-preemptive mode. (The higher number represents higher priority) (om) 5. Consider the following set of processes, with the length of the CPU burst given in milliseconds: Process Burst Time Arrival Time Pi 5 0 P2 3 1 P3, 1 2 Pa Zi 3 PS 3 4 ‘The processes are assumed to have arrived in the order PI, P2, P3, P4 and PS all at time 0. a) Draw Three Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF(Non-Preemptive), RR (time quantum = 2), ) What is the turnaround time of each process for each of the scheduling algorithms in part a? c) What is the waiting time of each process for each of these scheduling algorithms? 4) Which of the algorithms results in the minimum average waiting time (over all processes)? (10M) marl ‘Module PO PEO Q.No. | Number |COM*PPEE | Mapped Mapped | PSOMapped | Marks a 1 12 12 12 12 10 a 2 T 12 1 1 10 a 2 4 25 4 10 aa 2 a 25 4 i0 Os 2 4 25 4 10 Page 2 of 2

You might also like