Шукаєте відповіді та рішення тестів для Operating Systems Even Sem 24-25? Перегляньте нашу велику колекцію перевірених відповідей для Operating Systems Even Sem 24-25 в moodle.coep.org.in.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
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;}
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
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");}
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!