Professional Documents
Culture Documents
K K BIRLA, GOA-CAMPUS
OPEN BOOK, Quiz -1
Subject Name: Operating Systems (CS F372), Time: 40 Minutes Max. Marks: 30
#include <sys/types.h> }
#include <stdio.h> else if (pid > 0) {
#include <unistd.h> wait(NULL);
#define SIZE 5 for (i = 0; i < SIZE; i++)
int nums[SIZE] = {0,1,2,3,4}; printf("PARENT: %d ",nums[i]); /* LINE Y */
int main() { }
int i; return 0;
pid_t pid; }
pid = fork();
if (pid == 0) {
for (i = 0; i < SIZE; i++) {
3. Consider the snapshot at time t in a Uniprocessor system. The I/O bound processes are represented as
xPy which means Process P goes for x units of I/O operation after every y units of execution.
a. Find the resultant schedule and represent it as Gantt chart using Preemptive Priority scheduling
algorithm. [5M]
b. Find normalized turnaround c. Find waiting period of process d. Mention the time(s) at which
time of process D. B. preemption(s) occur.
[2M] [2M] [1M]