Timedora
Free Practice Quiz Question List

Systemcalls Online Quiz Questions

Use this free practice quiz with 20 questions to review Systemcalls, test your knowledge, and prepare for your next test or exam.

20 questions
01
Choose one
1 point

What role does an operating system's system-call interface serve?

  1. A

    A list of instructions that processes execute directly to access kernel memory.

  2. B

    An abstraction layer between the kernel and user code.

  3. C

    A set of rules that prevents the kernel from performing privileged operations.

  4. D

    A collection of user programs that replaces the operating system kernel.

02
Choose all
1 point

Select all statements that correctly describe exit or waitpid.

  1. A

    exit terminates the process that calls it.

  2. B

    waitpid creates a child process and starts it running.

  3. C

    waitpid blocks until the specified process finishes.

  4. D

    waitpid can optionally receive status information and options.

03
True or false
1 point

Signals let the kernel communicate with processes, and a process can ask the kernel to send a signal to another process.

  1. A

    True

  2. B

    False

04
Written response
1 point

After a successful fork() call, what numeric value does the child process receive as the return value?

05
Fill in the blank
1 point

The exec call the current process's program with a new executable without creating or destroying a process.

06
Open ended
1 point

Describe how a parent process can use fork, child-side exec, and waiting to run a new command in a child process.

07
Choose one
1 point

How does a process use a system call to perform a privileged operation, such as accessing a file?

  1. A

    A process directly performs privileged operations in kernel space without involving the OS.

  2. B

    A system call allows the process to bypass the OS's access-control decisions.

  3. C

    A process asks the OS to perform a privileged operation on its behalf.

  4. D

    A system call gives the process permanent control over other processes.

08
Choose all
1 point

Select all statements that correctly describe processes' requests for privileged operations and the kernel's role.

  1. A

    A process can request that the OS perform a privileged operation on its behalf.

  2. B

    A process can directly manage other processes without the OS.

  3. C

    Accessing files is an example of a privileged operation.

  4. D

    Kernel control over privileged operations lets the OS enforce rules such as file access control.

09
True or false
1 point

In the usual fork-and-exec pattern for running a command in a child, the parent calls exec to replace its own program, while the child waits for the parent.

  1. A

    True

  2. B

    False

10
Written response
1 point

In execl("/bin/ls", "ls", "-l", NULL), what exact string is passed as the target program's first command-line argument (argv[0])?

11
Fill in the blank
1 point

To wait for a particular child process, waitpid is given its . The call until that process finishes.

12
Choose one
1 point

After a successful fork, how can the child and parent distinguish which process is running?

  1. A

    The child receives 0, and the parent receives the child’s process ID.

  2. B

    Both processes receive the same positive process ID.

  3. C

    Both processes receive 0.

  4. D

    The child receives the parent’s process ID, and the parent receives 0.

13
True or false
1 point

A registered signal handler runs when its process receives the corresponding signal, interrupting the normal flow of execution.

  1. A

    True

  2. B

    False

14
Written response
1 point

What is the name of the standardized OS abstraction implemented by systems including Linux and macOS?

15
Choose one
1 point

A process calls exec to run a new executable. What happens to the process itself?

  1. A

    The current process is transformed in place to run the new program.

  2. B

    A new process is created, and the current process is unchanged.

  3. C

    The current process is destroyed, and a new process is created.

  4. D

    The current process and its program are both unchanged.

16
True or false
1 point

waitpid blocks until the process it is waiting for finishes.

  1. A

    True

  2. B

    False

17
Written response
1 point

After fork creates a child, which system call does the child use to replace its program with the new command?

18
Choose one
1 point

Which function requests that a signal be sent to another process identified by its process ID?

  1. A

    raise(sig)

  2. B

    kill(pid, sig)

  3. C

    signal(sig, handler)

  4. D

    waitpid(pid, NULL, 0)

19
Written response
1 point

After a successful fork, what numeric value does the child process receive as the call’s return value?

20
Choose one
1 point

What does a process use a system call to do when it needs a privileged operation, such as accessing a file?

  1. A

    It directly performs any privileged operation from user space.

  2. B

    It transfers control of all its memory to another process.

  3. C

    It requests that the OS perform a privileged operation on its behalf.

  4. D

    It prevents the kernel from enforcing access-control rules.