micro kernel: scheduling of device drivers, services and use
Posted: Thu Feb 24, 2005 6:26 am
again me: /dev/brain is rambling around the following stuff due to the recent discussion about scheduling in linux 2.6 kernels (this o(1) stuff with the two priority queues - I have finally got it)
What about giving time slices to device drivers too? so that the floppy driver can be eventually preempted by the mouse driver and vice versa in round robin manner. So that a service can be preempted by another service or has to give up cpu and let others get their share of cpu time?
My current aproach is Top Down: i.e. User app asks service and blocks. Service eventually needs something from device driver and blocks. device driver does the dirty work, returns data to the service (as working in the address space of the service this is sometimes as simple as copying data over to a buffer in the service). service processes the data and returns reply/data to the userland process.
you see, the kernel components all run as long as they need cpu. No preemption will ever happen inside a priority, i.e. if floppy has the cpu, mouse can way till it gets black if floppy is caught in an endless loop == bug!!?It requires the device drivers to act in a straight forward manner and to keep execution paths as short as possible.
Hm ... I need to think more about it. Much more. Anyway, where 'd be the fun if it weren't for things like this showing up occasionally.
What about giving time slices to device drivers too? so that the floppy driver can be eventually preempted by the mouse driver and vice versa in round robin manner. So that a service can be preempted by another service or has to give up cpu and let others get their share of cpu time?
My current aproach is Top Down: i.e. User app asks service and blocks. Service eventually needs something from device driver and blocks. device driver does the dirty work, returns data to the service (as working in the address space of the service this is sometimes as simple as copying data over to a buffer in the service). service processes the data and returns reply/data to the userland process.
you see, the kernel components all run as long as they need cpu. No preemption will ever happen inside a priority, i.e. if floppy has the cpu, mouse can way till it gets black if floppy is caught in an endless loop == bug!!?It requires the device drivers to act in a straight forward manner and to keep execution paths as short as possible.
Hm ... I need to think more about it. Much more. Anyway, where 'd be the fun if it weren't for things like this showing up occasionally.