comp.lang.ada
 help / color / mirror / Atom feed
From: ebert@muc.de (Rolf Ebert)
Subject: scheduler program in Ada
Date: 1998/06/05
Date: 1998-06-05T00:00:00+00:00	[thread overview]
Message-ID: <6l97ru$l9@colin.muc.de> (raw)


I'd like to write a scheduler in Ada much like the Unix crond
program.

The program has a cycle time of 5 minutes, for example.   A config file
specifies jobs which have to be started at a given offset from the 
start of the cycle.  That is I have a list of (offset,job) pairs.
The possible offsets have a resolution of 1/10 sec.  Theoretically
we could start 5*60*10=3000 jobs per 5min. cycle.

What is the best approach to do that in Ada?

I have thought about two possible solutions:
1) One task starts a new task every 1/10 sec. The newly created task
   looks into the (offset,jobs) - list and decides if anything is to do.
   If it is , it starts the corresponding job.  Either the task terminates
   after finishing the job or it stops if there is nothing to do.

2) As the list of (offset,job)-pairs does not change over time, the 
   scheduler can calculate the starting times once for all.  It can than 
   avoid starting unneccessary tasks .

Not having too much experience with the tasking facilities of Ada, is there
anything else I can do?

	Rolf
	ebert@wapor.muc.de
	ebert@muc.de
	ebert@pe-muc.de






             reply	other threads:[~1998-06-05  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-05  0:00 Rolf Ebert [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-06-06  0:00 scheduler program in Ada tmoran
1998-06-06  0:00 ` Samuel Tardieu
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox