in Operating System recategorized by
11,045 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
in Operating System recategorized by
11.0k views

4 Comments

signals may be handled by two possible handlers,default or if user defined overriding default one.Here which is handling the signal?default or user defined?
0
0
I think this question could be done by option elimination method:

Since b and d are the same hence they both cannot be the answer as multiple options not allowed.

Now, superuser mode is a mode that requires an administrator to do certain tasks.

Now think of a situation when you are using a computer in guest mode. Now you have written an infinite loop program and running in cmd. Now to stop cmd you will press ctrl+c and immediately the program stops without asking any permission. Now, this means CPU does not ask you for admin permission to do ctrl+c. This means the task can be done without going superuser mode.

Now, you have only one option left. Hence, A will be the answer.

Please correct if I'm wrong.
1
1
edited by
is this in syllabus?
2
2

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

4 Comments

superuser mode ---

Sudo command

Sudo (superuser do) is a utility for UNIX- and Linux-based systems that provides an efficient way to give specific users permission to use specific system commands at the root (most powerful) level of the system

0
0

@BikramIn Linux we write sudo...something. Which means user mode, right?

0
0
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

 

1 comment

This shd be the best ans.
0
0
9 votes
9 votes

1 comment

according to this link it should be kernel mode right?
0
0
3 votes
3 votes
Answer: A

3 Comments

what is the difference between kernel mode and privledge mode... ?? why only A is answer not C?
1
1
Privilege mode and kernel mode both are the same thing so the  answer can be A or C
1
1

@S Ram

Kernel mode == Privileged mode

so option B == option D , when an user send a request it can not be in privileged mode so both option B and D are wrong ..

there is nothing called super user mode so option C is wrong clearly ..

we only left with option A , and that is correct option .

4
4
Answer:

Related questions