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

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

 



Thanks for the information.  It helps.

Sounds to me like, we can completely disable
preemption (time sharing feature) of lk 2.6 and then
lk 2.6 will act like lk 2.4?

How/where/when can we use:

preempt_disable()
preempt_enable()
get_cpu()
put_cpu()

on lk 2.6 to change it to a non-preemptive OS?  Google
only gives me one search result for preempt_disable.

Thanks,


T


--- manish regmi <manish_regmi@hotmail.com> wrote:
> 
> >Thanks for the information.  It helps a lot!
> >
> >Just want to make sure I understand it.  Could you
> >please confirm or correct me on the following two
> >questions:
> >
> >- on a lk2.4 uni-processor box.  Can we say only
> one
> >function, which could be kernel's or my module's
> (my
> >module is part of kernel any way), can run at a
> time
> >and that function execution must complete before
> >another kernel function can be invoked, correct?
> 
> Exactly,
> 
> >- on a lk2.6 ("Preemptive kernel") uni-processor
> box,
> >kernel can switch back and forth between two kernel
> >function executions before they complete (i.e.
> using
> >time sharing), right?
> 
> Yes,
> But not always. There are times where kernel
> premption is not possible. In 
> places where preemption causes race conditions.
> preemption is disabled using
> preempt_disable()
> preempt_enable()
> get_cpu()
> put_cpu()
> 
> regards manish
> 
>
_________________________________________________________________
> Tired of spam? Get advanced junk mail protection
> with MSN 8. 
> http://join.msn.com/?page=features/junkmail
> 
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

--
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