On Friday 18 October 2002 04:56 am, Momchil Velikov wrote: > >>>>> "Sonawane" == Sonawane, Rahul (Rahul) <sonawane@avaya.com> writes: > > Sonawane> Let me ask the other way. If a real-time process(SHED_FIFO) > Sonawane> is running and it needs some IO to be done ,in that case > Sonawane> will it go in the wait queue or it will just continue > Sonawane> executing till it finishes without giving other processes > Sonawane> any chance. Thanks for your response, Rahul This switch statment in schedule() removes any process from the run queue that is in a state that is not TASK_RUNNING. (i.e blocking for I/O) 586 switch (prev->state) { 587 case TASK_INTERRUPTIBLE: 588 if (signal_pending(prev)) { 589 prev->state = TASK_RUNNING; 590 break; 591 } 592 default: 593 del_from_runqueue(prev); 594 case TASK_RUNNING:; 595 } > > Depends, but in general the thread, which performs I/O will block, > waiting for the I/O to finish, thus allowing other threads to > run. Sometimes (with PIO) it is possible for the thread to to all the > work itself, without blocking. While being incredibly stupid, > nevertheless there may exist drivers written that way or devices, > which do not allow other implementation (e.g. have no interrupts). In > that case no other thread will run. > > ~velco > > PS. For the second case, one may create a dedicated driver thread in > order to compensate for the lack of parallellism in the device and > allow the original real-time thread to block. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/