recategorized by
10,945 views
43 votes
43 votes
A user level process in Unix traps the signal sent on a Ctrl-C input, and has a signal handling routine that saves appropriate files before terminating the process. When a Ctrl-C input is given to this process, what is the mode in which the signal handling routine executes?
  1. User mode
  2. Kernel mode
  3. Superuser mode
  4. Privileged mode
recategorized by

7 Answers

43 votes
43 votes
  • When an user send an input to the process it can not be in privileged mode  as it is coming from an user so option D , Privileged mode can not be possible here ..

Now see , kernel mode = Privileged mode 

  • That means both option B and option D are equal. As option D can not be possible , option B also false.
  • There is nothing called  superuser mode so option C is clearly wrong .
  • Only option A is left , when an user input come like ' ctrl+c' the signal handling routine executes in user mode only as a user level process in UNIX traps the signal.

Hence option A is correct answer.

edited by
22 votes
22 votes

 

This is what the Galvin text has to say.  Usually, there are two types of signal handlers: Kernel Level and user level. Now the kernel level is the default one. But if we look at the wordings of the question in details :

A user level process in Unix traps the signal sent on a Ctrl-C input, and has a signal handling routine that saves appropriate files before terminating the process.

It clearly means that the signal handling routine is a part of the user-level process and hence it shall run in user mode.

 

Ans: (A) USER MODE

 

3 votes
3 votes
Answer: A
Answer:

Related questions

13 votes
13 votes
3 answers
1
Kathleen asked Sep 22, 2014
12,349 views
A common property of logic programming languages and functional languages is:both are procedural languages both are based on $\lambda$-calculusboth are declarativeboth us...
5 votes
5 votes
3 answers
3