RE: Help - does module run as a single thread process?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Suppose there are two modules, modA and modB.  What's
going to happen if modB calls a function,
modA_func_2(), defined in modA while modA is running
another function of its own, modA_func_1()?

I need modA completes modA_func_1() before responsing
to modB's call to modA_func_2().  Can I assume kernel
will do this for me?  If I understand right, a module
runs as a single thread process.  Therefore, when
something is running, other requests must wait.
Please correct me if I'm wrong

hi,
The kernel code runs on a behalf of a process. By making kernel modules(and doing insmod), you are attaching your code to the kernel. So your modules also runs ONLY during interrupt handling or system call.
In a Uniprocessor, only one code will be running. Unless using "Preemptive kernel"(available in 2.6) no two process can be running in behalf of kernel. so no question of process A handling modiule 1 and Process B handling module 2.


That is somewhat possible in Solaris. it creates a seperate kernel thread to handle each interrupt and the kernel is preemptive too.
I hope linux kernel developers are working on that and soon be ready.


BTW: Have they started working for 2.7 kernel.

regards manish

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux