At 9:04 AM -0600 24/5/2002, Trevor Hamm wrote: >On Fri, 2002-05-24 at 00:54, Sudeep Rege wrote: > > 1. does schedule return immediately, or blocks by shifting >> CPU attention to another process (because we are not TASK_RUNNING) >> > >schedule() invokes the scheduler, which generally swaps the current >process out and swaps in a new process to run on that CPU. Depending on >the priority of the calling process, and the number of other processes >in the runqueue, the scheduler may choose the calling process as the >next process to run, in which case schedule() returns almost >immediately. But generally, it blocks. Just a minor point: that's not called a "block". AFAIK, blocking is when your process isn't eligible until a certain condition is met. ie. waiting for a file read; the scheduler won't choose the process until it's unblocked by the FS code. ------ javier -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/S d- s+:-- a C+++$ UL++++$ P+ L+++$ E W+++$ N- o? K? w--- O- M+++$ V- PS PE Y+ PGP- t+ 5- X+ R- !tv b+++ DI+++ D G+ e? h! r++ y+ ------END GEEK CODE BLOCK------ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/