Home > Unix Programming > Quizzes > Unix Basics Practice Test: System Calls Basics
Unix Basics Practice Test: System Calls Basics
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 0% Most missed: “Which of the following system call is used for closing a file?”
Unix system calls System calls are the way that a process communicates with the operating system kernel. They provide a way for processes to request services from the kernel, such as reading and writing files, creating and managing processes, and accessing hardware devices. System calls are typically implemented as functions that are exported by the kernel. When a process makes a system call, it traps into the kernel, which then executes the requested operation. Once the operation is complete, the kernel returns control to the process. There are many different system calls available in... Show more
Unix Basics Practice Test: System Calls Basics
Time left 00:00
18 Questions

1. There are ___ modes of opening a file.
2. close system call returns ____
3. write system call returns -1 when ___________
4. For reading input, which of the following system call is used?
5. For reading input, which of the following system call is used?
6. ____ system call is used for writing to a file.
7. All UNIX and LINUX systems have one thing in common which is ____
8. The chmod command invokes the ____ system call.
9. In ____ mode, the kernel runs on behalf of the user.
10. Which of the following system call is used for truncating a file?
11. Which of the following mode is used for opening a file in both reading and writing?
12. open system call returns the file descriptor as ___
13. write system call returns -1 when ___________
14. In ____ mode, the kernel runs on behalf of the user.
15. A system call is a routine built into the kernel and performs a basic function.
16. truncate needs the ___ of the file as an argument but ftruncate works with _______
17. When we execute a C program, CPU runs in ____ mode.
18. Which of the following offset is used with lseek system call to set the offset pointer to the end of the file?