Re: Terminate and Stay Resident Software (TSR) in Linux



Sebastian wrote:

Why give a timeslice to a process waiting for input that the scheduler
knows has not received that input? That's just a waste of resources.

Yes, that was my idea, too. I did not know how/if it's done.

It's done with interrupts. The task goes to sleep and never gets a timeslice until the interrupt occurs to wake it up.

Timeslices are only allocated to tasks which are actually runnable, ie they are not sleeping waiting for an interrupt.

.



Relevant Pages

  • Re: [PATCH] O16int for interactivity
    ... >> Preemption of tasks at the same level with twice as much timeslice has been ... >> performance of cpu intensive tasks). ... > A hardware timer interrupt happens at timeslice granularity. ...
    (Linux-Kernel)
  • Re: when context switch occurs?
    ... > before the timeslice is used up due to some other process with a higher ... And actually both kinds of preemption happens on the return ... interrupt, and other kinds of preemption usually happens on ... hardware which switches to kernel mode, ...
    (comp.os.linux.development.system)
  • Re: [PATCH] O16int for interactivity
    ... >>A hardware timer interrupt happens at timeslice granularity. ... at a higher priority, then it gets run at that point. ...
    (Linux-Kernel)
  • Re: [PATCH] O16int for interactivity
    ... > intensive non interactive tasks can run out their full timeslice (may also ... A hardware timer interrupt happens at timeslice granularity. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: 8ms Timer for serial port access
    ... sleep has a grainularity of 10ms. ... and that's at the next 10ms interrupt. ... -scheduler runs as soon as the driver tasklett completes. ... Disable the FIFO on your UART so you get an interrupt for every byte. ...
    (comp.os.linux.development.apps)