On Tue, 19 Apr 2005, P.F. Tsai wrote: > 1, how does need_resched() work? I dont understand how the test_bit() > called inside is doing The bit can get set from interrupt context. All test_bit() does is test if the bit is set. > 2, how does default_idle work? what does it do? what does halt mean? Halt basically tells the CPU to do nothing until something happens, eg. an interrupt. This makes the CPU consume less power, yields the hyperthread's resources to the other thread, etc... > 3, if once the cpu goes into idle with the while(1)-loop, will it be very > busy (100% cpu utility) with looping around ?? Kind-of - if the cpu supports halt, it'll actually get "stuck" in that instruction until an interrupt happens. > thx for helping.... Success with your homework ;) -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/