2,426 views

3 Answers

9 votes
9 votes

Can anyone tell what are different activities that are performed in 

  • kernel mode
  • user mode
  • Kernel mode, also known as system mode, is one of the two distinct modes of operation of the CPU in Linux. The other one is user mode, a non-privileged mode for user programs, that is, for everything other than the kernel.
  • When the CPU is in kernel mode, it is assumed to be executing trusted software, and thus it can execute any instructions and reference any memory addresses (i.e., locations in memory).
  • The kernel (which is the core of the operating system and has complete control over everything that occurs in the system) is a trusted software, but all other programs are considered untrusted software.
  • Thus, all user mode software must request use of the kernel by means of a system call in order to perform privileged instructions, such as process creation or input/output operations. 
  • A system call is a request to the kernel in a Unix-like operating system by an active process for a service performed by the kernel. 
  • All processes begin execution in user mode, and they switch to kernel mode only when obtaining a service provided by the kernel. This change in mode is termed a mode switch .

Reference :

http://www.linfo.org/kernel_mode.html

2 votes
2 votes
Privileged mode==kernel mode
Non privileged mode==user mode
 From kernel to user mode, a non privileged instruction is required.
From user to kernel mode., a software interrupt is required.

Related questions

0 votes
0 votes
3 answers
2
jayadev asked Feb 1, 2022
950 views
Consider the following program segment of C-programming language:#include<stdio.h int main() { if (fork() || fork()) fork(); printf("GATE\n"); return 0; } Number of times...
0 votes
0 votes
1 answer
3
jayadev asked Dec 7, 2021
433 views
Why the operating system has the knowledge about kernel level threads but not about user level threads?
1 votes
1 votes
1 answer
4
jayadev asked Dec 6, 2021
380 views
Does kernel level threads have separate PCB(process control block)?