whats the usermode and kernelmode

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lokesh yadav
    New Member
    • Nov 2006
    • 5

    whats the usermode and kernelmode

    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........ ............... ..
  • seeminsuleri
    New Member
    • Nov 2006
    • 9

    #2
    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.

    Originally posted by lokesh yadav
    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........ ............... ..

    Comment

    Working...