Re: sched summary

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

 



On 10/22/08, Vikram_Upparpalli <Vikram_Upparpalli@xxxxxxxxxx> wrote:
Hi Peter,

Ps: Pardon me if my understanding is wrong.

OS is VRTX (Versatile Real Time Execute) from the Mentor Graphics.

Yes it is an RTOS.... where the timeliness is determined already... like I have decided to run one task (say X) periodically once in 250ms.
So I would assign a priority P for this task X.

Confusion is about the timeliness. Like if I have already determined the priority  P for this task X and the system works fine with the priority P to decide running the task X. what if I want to add one new task (there is a system call through which I can create a task from some application code dynamically). Wouldn't the timeliness be disturbed?

My view of the running tasks is - The priority P assigned to this task X is such that after the every 250ms, the tasks being executed would definitely have the priority P' where P' < P. so after every 250ms, what ever task is running could be swapped and task X could be run since the priority resolves the issue.

Now I am adding one new task with some priority (say also < P). would the system still work well as earlier? Though the new task has priority which is < P, would the timeliness still be maintained?

The priority of the new task  is  _less_than_ the priority of current task  means that the new task needs to wait for it's chance to be picked by the scheduler. I guess you know how O(1) scheduler picks the next task to run via priority array.  In your case all active(runnable) tasks of higher priority that didn't use up their timesclice has to run first. The tasks of same priority are scheduled in a round-robin manner. I hope this helps. Also a higher priority task that is sleeping on some event to happen preempts the currrent lower priority task when it wakes up.

-
Rahul Pydimukkala




--
Smart data structures and dumb code works a lot better than the other way
around. -Eric S Raymond

[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