Deck 23: Operating System Concepts: System Calls, Threads, and Signals

Full screen (f)
exit full mode
Question
Which of the following system calls does not return control to the calling point, on termination?

A)fork
B)exec
C)ioctl
D)longjmp
Use Space or
up arrow
down arrow
to flip the card.
Question
Which of the following system calls transforms executable binary file into a process?

A)fork
B)exec
C)ioctl
D)longjmp
Question
Which of the following calls never returns an error?

A)getpid
B)fork
C)ioctl
D)open
Question
A fork system call will fail if

A)the previously executed statement is also a fork call
B)the limit on the maximum number of processes in the system would be executed
C)the limit on the minimum number of processes that can be under execution by a single user would be executed
D)all of the mentioned
Question
If a thread invokes the exec system call

A)only the exec executes as a separate process
B)the program specified in the parameter to exec will replace the entire process
C)the exec is ignored as it is invoked by a thread
D)none of the mentioned
Question
If exec is called immediately after forking

A)the program specified in the parameter to exec will replace the entire process
B)all the threads will be duplicated
C)all the threads may be duplicated
D)none of the mentioned
Question
If a process does not call exec after forking

A)the program specified in the parameter to exec will replace the entire process
B)all the threads should be duplicated
C)all the threads should not be duplicated
D)none of the mentioned
Question
What is Thread cancellation?

A)the task of destroying the thread once its work is done
B)the task of removing a thread once its work is done
C)the task of terminating a thread before it has completed
D)none of the mentioned
Question
When a web page is loading, and the user presses a button on the browser to stop loading the page?

A)the thread loading the page continues with the loading
B)the thread loading the page does not stop but continues with another task
C)the thread loading the page is paused
D)the thread loading the page is cancelled
Question
When one thread immediately terminates the target thread, it is called___________

A)asynchronous cancellation
B)systematic cancellation
C)sudden termination
D)deferred cancellation
Question
When the target thread periodically checks if it should terminate and terminates itself in an orderly manner, it is called?

A)asynchronous cancellation
B)systematic cancellation
C)sudden termination
D)deferred cancellation
Question
Cancelling a thread asynchronously

A)frees all the resources properly
B)may not free each resource
C)spoils the process execution
D)none of the mentioned
Question
Cancellation point is the point where

A)the thread can be cancelled - safely or otherwise doesn't matter
B)the thread can be cancelled safely
C)the whole process can be cancelled safely
D)none of the mentioned
Question
If multiple threads are concurrently searching through a database and one thread returns the result then the remaining threads must be___________

A)continued
B)cancelled
C)protected
D)none of the mentioned
Question
Signals that occur at the same time, are presented to the process___________

A)one at a time, in a particular order
B)one at a time, in no particular order
C)all at a time
D)none of the mentioned
Question
Which of the following is not TRUE?

A)processes may send each other signals
B)kernel may send signals internally
C)a field is updated in the signal table when the signal is sent
D)each signal is maintained by a single bit
Question
Signals of a given type___________

A)are queued
B)are all sent as one
C)cannot be queued
D)none of the mentioned
Question
The three ways in which a process responds to a signal are___________

A)ignoring the signal
B)handling the signal
C)performing some default action
D)all of the mentioned
Question
Signals are identified by___________

A)signal identifiers
B)signal handlers
C)signal actions
D)none of the mentioned
Question
When a process blocks the receipt of certain signals?

A)the signals are delivered
B)the signals are not delivered
C)the signals are received until they are unblocked
D)the signals are received by the process once they are delivered
Question
The___________maintains pending and blocked bit vectors in the context of each process.

A)cpu
B)memory
C)process
D)kernel
Question
In UNIX, the set of masked signals can be set or cleared using the___________  function.

A)sigmask
B)sigmaskproc
C)sigprocmask
D)sigproc
Question
The usefulness of signals as a general inter process communication mechanism is limited because___________

A)they do not work between processes
B)they are user generated
C)they cannot carry information directly
D)none of the mentioned
Question
The usual effect of abnormal termination of a program is___________

A)core dump file generation
B)system crash
C)program switch
D)signal destruction
Question
In most cases, if a process is sent a signal while it is executing a system call

A)the system call will continue execution and the signal will be ignored completely
B)the system call is interrupted by the signal, and the signal handler comes in
C)the signal has no effect until the system call completes
D)none of the mentioned
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 23: Operating System Concepts: System Calls, Threads, and Signals
1
Which of the following system calls does not return control to the calling point, on termination?

A)fork
B)exec
C)ioctl
D)longjmp
exec
2
Which of the following system calls transforms executable binary file into a process?

A)fork
B)exec
C)ioctl
D)longjmp
exec
3
Which of the following calls never returns an error?

A)getpid
B)fork
C)ioctl
D)open
getpid
4
A fork system call will fail if

A)the previously executed statement is also a fork call
B)the limit on the maximum number of processes in the system would be executed
C)the limit on the minimum number of processes that can be under execution by a single user would be executed
D)all of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
If a thread invokes the exec system call

A)only the exec executes as a separate process
B)the program specified in the parameter to exec will replace the entire process
C)the exec is ignored as it is invoked by a thread
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
If exec is called immediately after forking

A)the program specified in the parameter to exec will replace the entire process
B)all the threads will be duplicated
C)all the threads may be duplicated
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
If a process does not call exec after forking

A)the program specified in the parameter to exec will replace the entire process
B)all the threads should be duplicated
C)all the threads should not be duplicated
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
What is Thread cancellation?

A)the task of destroying the thread once its work is done
B)the task of removing a thread once its work is done
C)the task of terminating a thread before it has completed
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
When a web page is loading, and the user presses a button on the browser to stop loading the page?

A)the thread loading the page continues with the loading
B)the thread loading the page does not stop but continues with another task
C)the thread loading the page is paused
D)the thread loading the page is cancelled
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
When one thread immediately terminates the target thread, it is called___________

A)asynchronous cancellation
B)systematic cancellation
C)sudden termination
D)deferred cancellation
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
When the target thread periodically checks if it should terminate and terminates itself in an orderly manner, it is called?

A)asynchronous cancellation
B)systematic cancellation
C)sudden termination
D)deferred cancellation
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
Cancelling a thread asynchronously

A)frees all the resources properly
B)may not free each resource
C)spoils the process execution
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
Cancellation point is the point where

A)the thread can be cancelled - safely or otherwise doesn't matter
B)the thread can be cancelled safely
C)the whole process can be cancelled safely
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
If multiple threads are concurrently searching through a database and one thread returns the result then the remaining threads must be___________

A)continued
B)cancelled
C)protected
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
Signals that occur at the same time, are presented to the process___________

A)one at a time, in a particular order
B)one at a time, in no particular order
C)all at a time
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the following is not TRUE?

A)processes may send each other signals
B)kernel may send signals internally
C)a field is updated in the signal table when the signal is sent
D)each signal is maintained by a single bit
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
Signals of a given type___________

A)are queued
B)are all sent as one
C)cannot be queued
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
The three ways in which a process responds to a signal are___________

A)ignoring the signal
B)handling the signal
C)performing some default action
D)all of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
Signals are identified by___________

A)signal identifiers
B)signal handlers
C)signal actions
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
When a process blocks the receipt of certain signals?

A)the signals are delivered
B)the signals are not delivered
C)the signals are received until they are unblocked
D)the signals are received by the process once they are delivered
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
The___________maintains pending and blocked bit vectors in the context of each process.

A)cpu
B)memory
C)process
D)kernel
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
In UNIX, the set of masked signals can be set or cleared using the___________  function.

A)sigmask
B)sigmaskproc
C)sigprocmask
D)sigproc
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
The usefulness of signals as a general inter process communication mechanism is limited because___________

A)they do not work between processes
B)they are user generated
C)they cannot carry information directly
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
The usual effect of abnormal termination of a program is___________

A)core dump file generation
B)system crash
C)program switch
D)signal destruction
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
In most cases, if a process is sent a signal while it is executing a system call

A)the system call will continue execution and the signal will be ignored completely
B)the system call is interrupted by the signal, and the signal handler comes in
C)the signal has no effect until the system call completes
D)none of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 25 flashcards in this deck.