linux kernel questions need help
Hi guys
It would be of great help if i get some answers for my questions bellow. 1) I wanted to know can kernel space access user space pointers ,variable and functions just by including the user space header files yes or no ? if no then what happen when kernel tries to access user space pointer. 2) kmalloc(1024,GFP_USER); where does the above kmalloc function allocate memory is it kernel space or in user space. 3) How is semaphore used in Inter process communication? 4) How is device power management handled in linux ? i mean i need the complete process in the form of code and document for any simple device. a) starting from registering the device driver into the kernel module b) power consumed by the module during run time idle time etc and who decide the power consumed by the device must be 'x' volts during normal operation and 'x-y' volts during idle mode and 0 volts during sleep mode in which case the state of the device is saved and restored back when the device is woken up. |
Sounds like a homework question.
|
Hi,
It would be great help for us if you atleast try to use google once before posting the questions. You can refer the follwoing http://oreilly.com/catalog/linuxdrive3/book/index.csp Understanding Linux Kernel. |
Quote:
http://www.makelinux.net/ldd3/chp-8-sect-1.shtml and http://people.ee.ethz.ch/~arkeller/l...ace_howto.html |
Quote:
Put in the following keywords in Google search bar and hit enter: Quote:
Quote:
One more advice: Quote:
|
Hi Anisha and bsat
thanks for the reply Before posting these questions i google to find the solutions but was unable to catch up my questions are quite simple atleast for these 2 questions i am expecting to get some straight forward answer in one or two lines ------------------------------------------------------------------------------- 1) I wanted to know can kernel space access user space pointers ,variable and functions just by including the user space header files yes or no ? if no then what happen when kernel tries to access user space pointer. 2) kmalloc(1024,GFP_USER); where does the above kmalloc function allocate memory is it kernel space or in user space? (doubt)i know the answer for the above question is (solution as seen in google)--Used to allocate memory for user-space pages now the doubt is where is this memory allocated in user space or in kernel space and for which process is this memory allocated user space process or kernel space process. i ask this question because user space process allocates memory with call to malloc and kernel space process allocates memory with call to kmalloc(size,GFP_KERNEL). ------------------------------------------------------------------------------- |
Quote:
The below link shows function access_ok, read its description. http://www.gnugeneration.com/mirrors...api/x3936.html and all I tried to get that link was to search in Google your keywords: Quote:
|
Once again thanks for your time anisha it was of great help
¬Nakul |
I am glad I could help you here :)
|
All times are GMT -5. The time now is 07:35 PM. |