1. What you will not find on a PC a) South Bridge b) East Bridge c) I/O APIC d) PCI Bus 2. In a network connection if you increase latency, throughput will :- a) Increase b) Decrease c) Will not change d) they are not related 3. Which one is true for dup2 (int oldfd, int newfd); a) Closes newfd, if it was a valid descriptor b) Makes newfd an exact copy of oldfd c) Two file descriptors will share same offset (lseek on one will affect both) d) All of the above 4.In which structure lstat,fstat fill the information about a file. a) statbuf b) filestat c) buf d) None of the above 5. Which one is valid flag when you pass to open system call a) O_ASYNC b) O_DIRECT c) O_LARGEFILE d) All of the above 6. Which one is true for the Thread a) Allows one process to use multiple CPUs or cores b) A thread is a schedulable execution context Program counter, stack, registers, . . . c) Allows program to overlap I/O and computation d) All of the above 7.int pipe (int fds[2]) a) Writes to fds[1] will be read on fds[0] b) When last copy of fds[1] closed, fds[0] will return EOF c) Both a and b d) None of the above 8. int flag1 = 0, flag2 = 0; void p1 (void *ignored) { flag1 = 1; if (!flag2) { critical_section_1 (); } } void p2 (void *ignored) { flag2 = 1; if (!flag1) { critical_section_2 (); } } int main () { tid id = thread_create (p1, NULL); p2 (); thread_join (id); } Can both critical sections run? a) Yes. b) No c) I don't know d) None of above 9. Scheduling decisions may take place when a process: a) Switches from running to waiting state b) Switches from running to ready state c) Exits d) All of the above 10. For processes which is true for Turnaround time a) Lower is better. b) Higher is better c) Not related to processes d) None of the above 11. What is indirect cost of context switch. a) Increase disk latency b) Increase load average c) TLB misses d) No cost at all 12. Object which is created during the compliation process of contains:- a) Object code b) Symbol Table. c) both a and b d) None of the above 13. Who does folloiwng:- - Collect together all pieces of a program - Coalesce like segments - Fix addresses of code and data so the program can run a) Loader b) Linker c) Compilier d) OS 14. What does inode contains for a directory a) Link counts b) Points to data blocks c) Both a and b d) None of the above 15. ARP – address resolution protocol a) Broadcast request for MAC address of IP address b) Everybody machine in network learns the requesting node’s MAC address c) Target machine responds with its MAC address d) All of the above 16. Followig is true for :- - Can be used anywhere, but not in a monitor - wait() does not always block its caller - signal() increases the counter and may release a process - If signal() releases a process, the caller and the released both continue a) Semaphore b) Mutex c) Conditional variables d) Futex 17. Predict the output of following statement printf("%d %d", sizeof("abcdef"), strlen("abcdef")) a) 7 6 b)7 7 c) 6 7 d) 6 6 18. Which of following is not argument of write/read system call a) Offset b) File descripor c) Size d) Nove of above 19. You use sigprocmask() to block the SIGKILL signal when your program starts running. What would happen if you send a SIGKILL signal to your running program by using "kill -9 "? a) Your program continues running. b) Your program terminates. c) It depends on what happens in the signal handler. d) None of the above 20. The correct order of calls for a TCP server is: a) socket(); bind(); b) socket(); bind(); connect(); c) socket(); bind(); listen(); accept(); d) bind(); socket(); listen(); 21. Every process has ? a) pid (Process ID) b) ppid (Parent Process ID) c) pgid (Process Group ID) d) All of the above. 22. Who can share the same PIDs? a) All the child processes of one parent. b) Threads c) Piped processes. d) Processes which shares a unix domain sockets. 23. To find the system calls made by the process which of the following utility is useful a) ltrace b) strace c) ptrace d) proc 24. Consider the following code fragment: int f1, f2; f1 = open([suitable arguments to open a file for reading and writing]) f2 = f1; close(f2) Which of the following will be true after the "close" statement? a) The FD f1 can be used for reading and writing, but f2 can't. b) Both f1 and f2 can be used for reading and writing. c) Neither f1 nor f2 can be used for reading and writing. d) f1 can be used for writing and f2 for reading. 25. Which of the following is true after an "exec"? a) FDs are left open across an exec, unless FD_CLOEXEC flag is set for that FD. b) FDs are closed across an exec, unless FD_CLOEXEC flag is set for that FD. c) FDs are always closed. d) FDs are always left open. 26. What would be output of following:- #define SQURE(a) (a * a) printf("%d %d", SQURE(3), SQURE(2 + 1)) a) 9 5 b)5 9 c)9 9 d) 4 9 27. Which of following is not a storage class in C a) register b) auto c) const d) static 28. What is the return type of sizeof ? a) int b) unsigned int c) size_t d) unsigned long 29. Will following statement compile correctly? a > b ? return "cat" : return "dog"; a) Yes b) No c) Depend on architecture d) Depend on compiler 30. What is the value stored in static variable if not initialized explicitly ? a) -1 b) 0 c) 1 d) None of the above