Featured
- Get link
- X
- Other Apps
PRACTICE QUESTIONS
1. Which of the following is NOT a Unix system call?
(a) open()
(b) malloc()
(c) execve()
(d) getpid()
answer---(B)
2. Which of the following system calls is used to create a new process?
(a) fork()
(b) execve()
(c) waitpid()
(d) getpid()
answer---(A)
3. Which of the following system calls is used to read data from a file?
(a) open()
(b) read()
(c) write()
(d) close()
answer---(B)
4. Which of the following system calls is used to write data to a file?
(a) open()
(b) read()
(c) write()
(d) close()
answer---(C)
5. Which of the following system calls is used to terminate a process?
(a) fork()
(b) execve()
(c) waitpid()
(d) kill()
answer---(D)
6. Which of the following system calls is used to get the PID of the current process?
(a) fork()
(b) execve()
(c) waitpid()
(d) getpid()
answer---(D)
7. Which of the following system calls is used to get the current system time?
(a) time()
(b) getpid()
(c) waitpid()
(d) kill()
answer---(A)
8. Which of the following system calls is used to change the current working directory?
(a) chdir()
(b) time()
(c) waitpid()
(d) kill()
answer---(A)
9. Which of the following system calls is used to access a file descriptor?
(a) open()
(b) read()
(c) write()
(d) close()
answer---(A)
10. Which of the following system calls is used to close a file descriptor?
(a) open()
(b) read()
(c) write()
(d) close()
answer---(D)
11. Which of the following system calls is used to create a pipe?
(a) pipe()
(b) open()
(c) write()
(d) close()
answer---(A)
12. Which of the following system calls is used to read from a pipe?
(a) pipe()
(b) open()
(c) read()
(d) close()
answer---(C)
13. Which of the following system calls is used to write to a pipe?
(a) pipe()
(b) open()
(c) write()
(d) close()
answer---(C)
14. Which of the following system calls is used to create a semaphore?
(a) semop()
(b) pipe()
(c) open()
(d) close()
answer---(A)
15. Which of the following system calls is used to wait on a semaphore?
(a) semop()
(b) pipe()
(c) open()
(d) close()
answer---(A)
16. Which of the following system calls is used to signal a semaphore?
(a) semop()
(b) pipe()
(c) open()
(d) close()
answer---(A)
17. Which of the following system calls is used to create a message queue?
(a) msgctl()
(b) semop()
(c) pipe()
(d) open()
answer---(A)
18. Which of the following system calls is used to send a message to a message queue?
(a) msgsnd()
(b) msgctl()
(c) semop()
(d) pipe()
answer---(A)
19. Which of the following system calls is used to receive a message from a message queue?
(a) msgrcv()
(b) msgsnd()
(c) msgctl()
(d) semop()
answer---(A)
20. Which of the following system calls is used to get the current user ID?
(a) getuid()
(b) msgrcv()
(c) msgsnd()
(d) msgctl()
answer---(A)
- Get link
- X
- Other Apps
Comments
Post a Comment