From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4C347866.30106@domain.hid> Date: Wed, 07 Jul 2010 14:51:50 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <4C345529.8010309@domain.hid> <4C3463FD.4040804@domain.hid> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] task management, multi-thread, multi-core List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Everett Wang Cc: xenomai@xenomai.org Everett Wang wrote: > On Wed, Jul 7, 2010 at 7:24 PM, Gilles Chanteperdrix > wrote: >> Everett Wang wrote: >>> If the second task is running already, when the >>> higher priority >>> task is waiting for an outside event, then the event comes, the high >>> priority task >>> has to wait until the lower priority one to finish? >> No. Xenomai scheduler is preemptive: >> http://en.wikipedia.org/wiki/Preemptive_multitasking > > That is why I thought to cut the lower priority but more CPU comsuming > task into smaller pieces and only let it run for one piece at a time > then wait so > higher priority task don't have to wait. Once the higher priority task has > done its thing, then send a trigger to the let the lower priority task to run > one more chunk. Is this the right thing to do or I am totally off the track? You are off the track. As I said, the scheduler is preemptive. -- Gilles.