Re: kernel_thread

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

 



On Sat, Jun 01, 2002 at 03:58:54PM +0530, J Pradeep wrote:
> On Fri, 31 May 2002, Christine Ames wrote:
> > > while(1){
> > > 
> > >    // do something
> > > 
> > > }
> On the newbies list I guess we need more info. Basically, if you were to
> do this in a normal user context - the processor scheduling would have
> ensured that your system is up and running. But inside the kernel your
> process is not preempted. Which essentially means that the processor is
> busy executing the while loop. You call this state as SYSTEM HANG.
> Non-preemption of the kernel process is the main catch here.


In other words. You have to call schedule() now and then. Eiter
explicitly once a loop, or when waiting for something (wait_on_event
macro or sleep_on , setting state and schedule).

--------------------------------------------------------------------------------
                  				- Jan Hudec `Bulb' <bulb@ucw.cz>
--
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