I am trying to write some code to schedule a set of real life tasks that are input by the user. These tasks are stored in an SQLite database. And at the moment, the only parameters I am taking into consideration are the,
The project to which a task belongs to --> p The name of the task itself --> t And the due date for this task --> d
due date parameters are optional. But assuming that the user will always input at least the
task name and
due date for every task.. I was wondering if it is possible to schedule the set of tasks using a scheduler like the Completely Fair Scheduler (CFS) for example. I realize that the CFS was written for scheduling tasks with much finer granularity (nanoseconds) than the set of tasks being proposed for this purpose... But I realized that it might be possible and maybe more efficient if I can modify it to work with tasks that are on the same time scale as our perception of time.
A typical entry in the database would be in the format (p, t, d). 'p' is optional. Here are a few examples:
(_, 'Call home', 29/2/2012) (Work, 'Meet boss', 14/3/2012) (Work, 'Ask for raise', 18/3/2012) (_, 'Book tickets', 10/3/2012) (Work, 'Quit', 14/4/2012) (Personal, 'Get botox injections', 10/3/2012) (Personal, 'Get breast implants', 10/10/2012) (_, 'Dad bday', 7/10/2012)
Here is a situation to consider. I would like to wake up in the morning. Run this "yet to be coded" algorithm on the set of tasks.. like the ones given above.. and I would like to receive a schedule for the rest of day, that maximizes throughput. At a later stage, I would like to pass arguments to this algorithms that would allow me to control the scheduler to return a set of tasks depending on my current situation. Like if I am at work, I want to be able to pass arguments to the algorithm, to ask it to only return tasks that can be completed at work..
I hope I am able to convey the gist of it. I understand that the
due date alone is not sufficient to schedule tasks using the CFS for example... but if there are other parameters that I should consider, please do let me know. And any suggestions for the kind of scheduling algorithm to employ would be helpful.