I/O scheduling
Posted: Fri Jan 17, 2003 4:35 pm
hi,
has anyone gotten to the stage where their OS/KERNEL can attend to an active interractive task while others run in the background? I do not mean MULTITASKING/MULTITHREADING but by interractive i mean the task could be asking for input from keyboard/mouse etc while other task continue in the background.
I have done my keyboard driver and was testing my server idea for handling requests.
The servers keep lists of pending request for services and attend to them in a FIFO order.This is where i'm reflecting on the best cause of action.
If you are running an interractive task (i.e its the active one) it should be the only one that if it requests for input from the keyboard should get it but the other background tasks' requests should be ignored. How would you handle that?
example
the system has 3 ready tasks, A, B and C that only need the CPU to be able to execute.
the user instructs the monitor to set task A as the active(foreground task ie it the one they want to work with) while tasks B and C can be scheduled to run in the background. now the users is suppose to supply input to tasks A at random times and tasks B and C also have places where the users has to supply input but these tasks shouldn't get what the user types since task A is the designated active task.
I was thinking of handling this as follows:-
I have a Process Control Block that points to the task that is choosen as Active and another that Points to the current Running task selected by the scheduler.
Now its up to the server to decide how to handle its list of requests.
For my keyboard, i was thinking of getting the request at the head of the list, compare PID of the task that made the request with the PID of the ACTIVE task, if they match then the request is handled but if they do not then i move to the next request in the list and repeat the process.
I choose this scheme so that the FIFO order is maintained.
Any suggestions please?
thanks
has anyone gotten to the stage where their OS/KERNEL can attend to an active interractive task while others run in the background? I do not mean MULTITASKING/MULTITHREADING but by interractive i mean the task could be asking for input from keyboard/mouse etc while other task continue in the background.
I have done my keyboard driver and was testing my server idea for handling requests.
The servers keep lists of pending request for services and attend to them in a FIFO order.This is where i'm reflecting on the best cause of action.
If you are running an interractive task (i.e its the active one) it should be the only one that if it requests for input from the keyboard should get it but the other background tasks' requests should be ignored. How would you handle that?
example
the system has 3 ready tasks, A, B and C that only need the CPU to be able to execute.
the user instructs the monitor to set task A as the active(foreground task ie it the one they want to work with) while tasks B and C can be scheduled to run in the background. now the users is suppose to supply input to tasks A at random times and tasks B and C also have places where the users has to supply input but these tasks shouldn't get what the user types since task A is the designated active task.
I was thinking of handling this as follows:-
I have a Process Control Block that points to the task that is choosen as Active and another that Points to the current Running task selected by the scheduler.
Now its up to the server to decide how to handle its list of requests.
For my keyboard, i was thinking of getting the request at the head of the list, compare PID of the task that made the request with the PID of the ACTIVE task, if they match then the request is handled but if they do not then i move to the next request in the list and repeat the process.
I choose this scheme so that the FIFO order is maintained.
Any suggestions please?
thanks