edited by
693 views
1 votes
1 votes

Consider the following statements.
1. A thread running in critical section never get context switched.
2. Hardware access to devices is usually available in user mode.
3. Modifications to the page tables are only possible in Kernel mode.

Which of the above statements are incorrect?

edited by

1 Answer

3 votes
3 votes

Let us consider the statements 1 by 1..

Statement 1 is false as context switch may occur for threads even when it is in kernel mode..For more reference :

http://stackoverflow.com/questions/37493084/can-a-thread-be-preempted-while-in-the-middle-of-a-critical-section

Statement 3 is true as modifying page tables is a priveleged operation and hence it is done in kernel mode not user mode..

Statement 2 is false as access to hardware device from user point can have serious security issues and hence needs to be done in kernel mode usually..For this we have to read about "Rings of Protection"

Hence  statement 1 and 2 is false..

Reference : http://stackoverflow.com/questions/5807123/how-does-windows-implement-user-mode-kernel-mode

edited by

Related questions