recategorized by
11,414 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
23 votes
23 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

12.5k
views
3 answers
13 votes
Kathleen asked Sep 22, 2014
12,516 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...
26.8k
views
6 answers
66 votes
Rucha Shelke asked Sep 26, 2014
26,834 views
A computer system supports $32$-bit virtual addresses as well as $32$-bit physical addresses. Since the virtual address space is of the same size as the physical address ...
6.3k
views
3 answers
5 votes
Ishrat Jahan asked Oct 30, 2014
6,265 views
Consider the following pseudo-code:IF ((A B) AND (C D)) THEN A = A + 1 B = B + 1 ENDIFThe cyclomatic complexity of the pseudo-code is2345
11.7k
views
4 answers
34 votes
Ishrat Jahan asked Oct 29, 2014
11,689 views
Consider a weighted, undirected graph with positive edge weights and let $uv$ be an edge in the graph. It is known that the shortest path from the source vertex $s$ to $u...