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

CIE01 2024 Scheme

This document is a question paper for the Operating Systems course at R V College of Engineering, detailing various topics and questions for assessment. It includes sections on process management, system calls, performance laws, and context switching, along with programming exercises and theoretical questions. The course outcomes outline the skills students are expected to acquire upon completion of the course.

Uploaded by

Raghuveer Rajesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

CIE01 2024 Scheme

This document is a question paper for the Operating Systems course at R V College of Engineering, detailing various topics and questions for assessment. It includes sections on process management, system calls, performance laws, and context switching, along with programming exercises and theoretical questions. The course outcomes outline the skills students are expected to acquire upon completion of the course.

Uploaded by

Raghuveer Rajesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

R V College of Engineering

Department of Computer Science and Engineering


CIE - I: Question Paper
Subject : OPERATING SYSTEMS (22CS35A1) Semester : 3rd B.E
(Code)
Date : .01.2024 Duration : 90 minutes Staff :
Name : USN : Section : A/B/C/D/CD/CY/ISE

Sl.n Part-A
Marks
o
1a. Explanation(1.5) & diagram(1M) for each 2.5*4=
• Simple structure – MS-DOS 10M
• More complex -- UNIX
• Layered – an abstrcation
• Microkernel -Mach
2 #include <sys/wait.h> 10
#include <time.h>

int main() {
for (int i = 0; i < 3; ++i) {
pid_t child_pid = fork();

if (child_pid == 0) {
printf("I AM A NEW CHILD\n");
sleep(10);
exit(0);
}
}

for (int i = 0; i < 3; ++i) {


int status;
pid_t terminated_child_pid = wait(&status);

printf("CHILD WITH PID %d TERMINATED\n", terminated_child_pid);


}

printf("PARENT PROCESS EXITING ...\n");

return 0;
}
3a 2*4=8

3b (i) A timer interrupt arrives 0.5*4=


(ii) An I/O interrupt arrives 2M
(iii) The process executes a syscall instruction
(iv) The process terminates execution
4 a. Amdahl’s Law Identifies performance gains from adding additional cores to an 3+3=6
application that has both serial and parallel components
S is serial portion
N processing cores

That is, if application is 75% parallel / 25% serial, moving from 1 to 2 cores
results in speedup of 1.6 times
As N approaches infinity, speedup approaches 1 / S
Serial portion of an application has disproportionate effect on performance
gained by adding additional cores
4b i) This is not a privileged instruction, as otherwise user programs can never 3
execute this.
ii) This must be a privileged instruction, as otherwise a user level program can
modify the value loaded in the timer, and hence tamper with the scheduling
policy of the operating system.
5a. i. The statement is FALSE. 5
In multiprogramming, a context switch from one program to another happens
only when the first program gets blocked due to an I/O operation. As such, the
primary objective is to maximize processor utilization; processor should not lie
idle, no unnecessary context
switches.
In time sharing system, there are a number of interactive users sitting on
terminals. Minimizing the user response time is the main objective here.
ii. The statement is TRUE.
When context switch happens with process, all registers, code area, data area,
stack area, open files, etc. must be saved and restored.
In threads, the code area, data area, open files, etc. are all shared among the
threads. Thus during context switch, only registers and stack area need to be
saved and restored. For this reason, thread scheduling is faster than process
scheduling.
iii. The statement is FALSE
It depends on the arrival time of process. If a shorter process arrives later than
the longer process then the average waiting time is not necessarily minimum.
5b. A system call or syscall is a machine level instruction that cause the mode to 5
switch from user to supervisor, and transfer control to a service routine (typically
inside the OS). An exception is an interrupt that is caused due to the execution
of an instruction. Examples include: trying to execute a privileged instruction in
user mode, divide by zero, memory access violation, etc. Interrupt hardware
interrupt in a hardware interrupt that is originating from within the processor. An
example in the timer interrupt in round‐robin scheduling.

L1 L2 L3 L4 L5 L6 CO1 CO2 CO3 CO4


Total -- 17 26 07 - - - 17 17 16
Marks

COURSE OUTCOMES:

Course Outcomes: After completing the course, the students will be able to
CO1: Describe the fundamental computer concepts and syntax of C programming.
CO2: Apply logical skills to design and develop algorithms/flow charts to solve real-world
problems.
CO3: Analyze the logic of the program and output obtained using different sets of input.
CO4: Design and develop programs using appropriate data structures and functions in C
language.

You might also like