Looking for Operating Systems Even Sem 24-25 test answers and solutions? Browse our comprehensive collection of verified answers for Operating Systems Even Sem 24-25 at moodle.coep.org.in.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Which of the following are NOT a part of job of a typical compiler?
Select the sequence of events that are NOT possible, assuming an interruptible kernel code
Consider the following code and MAP the file to which each fd points at the end of the code. Assume that files/folders exist when needed with proper permissions and open() calls work.
int main(int argc, char *argv[]) { int fd1, fd2 = 1, fd3 = 1, fd4 = 1; fd1 = open("/tmp/1", O_WRONLY | O_CREAT, S_IRUSR|S_IWUSR); fd2 = open("/tmp/2", O_RDDONLY); fd3 = open("/tmp/3", O_WRONLY | O_CREAT, S_IRUSR|S_IWUSR); close(0); close(1); dup(fd2); dup(fd3); close(fd3); dup2(fd2, fd4); printf("%d %d %d %d\n", fd1, fd2, fd3, fd4); return 0;}
Select all the correct statements about zombie processes
Select the order in which the various stages of a compiler execute.
Predict the output of the program given here.
Assume that there is no mixing of printf output on screen if two of them run concurrently.
In the answer replace a new line by a single space.
For example::
good
output
should be written as good output
--
int main() { int pid; printf("hi\n"); pid = fork(); if(pid == 0) { exit(0); } printf("bye\n"); fork(); printf("ok\n");}