IIIT Delhi Mail - OS Midsem
IIIT Delhi Mail - OS Midsem
OS Midsem
1 message
OS Midsem
Your email address ([email protected]) was recorded when you submitted this form.
Name *
Shubham Lohan
Roll Number *
2019275
Suppose you have opened a file for reading that has a lot of text. Now you call the
system call read() to read its content, with a buffer size of 100. What will the read()
function return?
100
https://mail.google.com/mail/u/1/?ik=dca342bcf2&view=pt&search=all&permthid=thread-f%3A1680621373514005916&simpl… 1/7
13/10/2022, 22:42 IIIT Delhi Mail - OS Midsem
Deciding if the outcomes of ALU operations for the sake of making appropriate jumps and / or
returns.
Suppose you call the write() system call to write "ABCD" to an empty file and then
immediately a different program reads the same file. What is the expected
behavior?
How does our system deal with paging and segmentation where it is in real-mode?
https://mail.google.com/mail/u/1/?ik=dca342bcf2&view=pt&search=all&permthid=thread-f%3A1680621373514005916&simpl… 2/7
13/10/2022, 22:42 IIIT Delhi Mail - OS Midsem
43
34
33
44
Which of the following problems does round robin scheduling suffer from?
starvation
priority inversion
Suppose you try to boot your computer without a RAM? At what stage will this
problem be flagged?
real-mode operation
extended-mode operation
Loading of GRUB
POST
https://mail.google.com/mail/u/1/?ik=dca342bcf2&view=pt&search=all&permthid=thread-f%3A1680621373514005916&simpl… 3/7
13/10/2022, 22:42 IIIT Delhi Mail - OS Midsem
Suppose you want to write exactly 100 bytes to disk using write system call. Which
of the following calls to write would lead to the fastest write?
Suppose you have a global variable x initialized to 0. You create a total of three
threads, each of which increment the value of x by 1. What will be the value of x at
the end of the program?
Interactive tasks
Vfork() does a lazy copy while fork() creates copies of all program memories – code, stack,
data, BSS, heap and RODATA.
pthread_create() and vfork() do a lazy copy while fork() creates copies of all program memories
– code, stack, data, BSS, heap and RODATA.
https://mail.google.com/mail/u/1/?ik=dca342bcf2&view=pt&search=all&permthid=thread-f%3A1680621373514005916&simpl… 4/7
13/10/2022, 22:42 IIIT Delhi Mail - OS Midsem
Both vfork() and fork() do the same thing. Pthread_create() however is different, in that it is
used for thread creation.
It is a kernel thread.
It does not have any PID, as it is a kernel thread, which anyways do not have PIDs associated.
It does not itself handle any signals, but allows child processes to do so.
Which of the following is NOT true about most process scheduling schemes:
The task scheduler also needs to take care of process memory allocation, so as to improve
✓
task scheduling efficiency, upon process creation.
Usually makes use of process priorities to allocate appropriate timeslices to various processes.
FIFOs work through message passing schemes while sockets communicate via byte streams.
Read and write to a FIFO cannot be pre-empted as it involves pre-empting and context
switching two processes, unlike the case of sockets where the messages are queued.
Bytes are queued in a FIFO, unlike that in a socket, where unread messages are lost.
Because Bytes are queued in a FIFO, unlike that in a socket, where unread messages are lost.
FIFOs cannot be used for real time communication, while sockets can.
https://mail.google.com/mail/u/1/?ik=dca342bcf2&view=pt&search=all&permthid=thread-f%3A1680621373514005916&simpl… 5/7
13/10/2022, 22:42 IIIT Delhi Mail - OS Midsem
Which of the following cannot be used while modifying or adding code to the Linux
kernel?
C data types
structure
Library function
Macros
What of the following is one of the disadvantages of having a monolithic kernel, like
Linux?
Slow performance
Suppose a new Intel processor adds an additional opcode which the Linux kernel
wants to use. How would it be able to use it?
Using a C statement
Suppose you have an array of size 10. You try to access position 15 in C. What
behavior do you expect?
Segmentation fault
Which of the following system calls returns control from the function only in case of
failure?
Fork
Clone
Exec
Wait
Suppose you want to run a (a) 32-bit executable program on a 64-bit Intel
processor, and (b) a 64-bit executable program on a 32-bit Intel processor. Which
of the following is correct, without using any simulator or emulator?
https://mail.google.com/mail/u/1/?ik=dca342bcf2&view=pt&search=all&permthid=thread-f%3A1680621373514005916&simpl… 7/7