By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,305 Members | 1,718 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,305 IT Pros & Developers. It's quick & easy.

whats the usermode and kernelmode

P: 5
hi


i have a dout that when programs call system fuction it goes to kernel mode and runs and also we are using the c programs in kernel programming that should run using c libraries and my dout is now it is kenel mode and how it calling library.........................
Nov 8 '06 #1
Share this Question
Share on Google+
1 Reply


seeminsuleri
P: 9
hey there,
I think you are not clear about the difference between User mode and kernel mode.
Sometimes there are some instructions that update the values of some variable that is actually required by another process.
Like I/O instrauctions, if a process wants to read a variable , say x, and another process updates the value of x, before the former can read it. Then the first process will never get the reuqired value. For this reason such I/O instructions are called Preveliged Instructions and can only be executed in Kernel mode.
There is a mode bit which is when set means user mode when zero means kernel mode.
There is a library for each process, when a process wants to perform some I/O operation, it calls a library funtion, against a system call is made automatically as a result of which some kernel code is executed.
The kernel is then responsable for the manipulation of the variable.

hopefully, this answers ur query.

hi


i have a dout that when programs call system fuction it goes to kernel mode and runs and also we are using the c programs in kernel programming that should run using c libraries and my dout is now it is kenel mode and how it calling library.........................
Nov 8 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.