BatchSystem::SBS::DefaultScheduler

BatchSystem::SBS::DefaultScheduler is a scheduler for the Simple Batch System.
Download

BatchSystem::SBS::DefaultScheduler Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Alexandre Masselot
  • Publisher web site:
  • http://search.cpan.org/~alexmass/BatchSystem-SBS-0.38/lib/BatchSystem/SBS/DefaultScheduler.pm

BatchSystem::SBS::DefaultScheduler Tags


BatchSystem::SBS::DefaultScheduler Description

BatchSystem::SBS::DefaultScheduler is a scheduler for the Simple Batch System. BatchSystem::SBS::DefaultScheduler is a scheduler for the Simple Batch System.FUNCTIONSscheduling_methodList()return an array with the name of the different methodsMETHODSmy $scheduler=BatchSystem::SBS::DefaultScheduler->new();Accessors$scheduler->Misc$scheduler->__lockdata()Lock joblist and resourcedata dump files at once$scheduler->__unlockdata()Unlock joblist and resourcedata dump files at onceJob action$scheduler->job_submit(id=>val, dir=>dir, command=>cmd, queue=>queue)$scheduler->job_status(id=>val )$scheduler->job_remove(id=>val)Remove the job #jobid from the list (maybe kill its processe if running$scheduler->job_signal(id=>val, signal=>SIG)Send a signal to a running job$scheduler->job_action(id=>val, action=>ACTION)Send an action to a registered job.ACTION can be ofKILL kill the processe or just take the joib out of the queue is it is PENDING$scheduler->job_info(id=>val);returns a hash ref to all the info on the job$scheduler->job_infoStr(id=>val);returns a simple string with a job info$sheduler->job_properties(id=>val);Return a reference to a Util::Properties object, stored into a "batch.properties" files in the job directory;$sheduler->job_execute(id=>val);$sheduler->__job_execute_scriptmorfer(id=>val, script=>scriptfile)It is an internal command that transform the submit script (if it was not just a command) into the ready to execute script.It meas that it will replace expression with the runtime value${jobid} ${machinefile} ${host} ${queue}Jobs List action$sbs->joblist_index();Return the job list index file$sbs->joblist_size();return number of jobs in the joblist$scheduler->__joblist_dump();Write the joblist on disk$scheduler->__joblist_pump();Read the joblist from the diskResourcesAll what concerns the machine & cluster ready to make computations$scheduler->resources_check()Make a coherence check of the resources status (if a resource is attributed to a dead job, for example, it will be freed). This should not be called, except to solve some spurious locking problems - that shoould anyway not exist anymore...$scheduler->resources_removenull()remove null ID job (well, that's not the cleverest piece of code design...)$scheduler->resourcesStatus_init()Synchronize resources defined in the configuration with the one in resourcesStatus()$scheduler->__resourcesStatus_dump();Write the resourcesStatus on disk$scheduler->__resourcesStatus_pump();Read the resourcesStatus from the diskScheduling$scheduler->scheduling_update()Run a scheduler->scheduling_next_reserve() + a submition on returned jobs$scheduler->scheduling_method(name)Set the scehduling method (see BatchSystem::SBS::DefaultScheduler::scheduling_methodList() to have a list of all possible methods)Scheduling method sorting methods take a list of pending jobs an reorder them by priority (warning: it may happen that the returned list is shorter than the input one (in case there is a limit on the number of submission for one queue, for example).Scheduling available are:fifoFirst in/first outlifoLast in /first out (better be late)random priorityfifoBased on priority & fifoprioritylimitbased on priority + fifo + maxConcurentJob per queues (if a queue is generated via a regular expression, eaxch queue is counted separately).scheduler->scheduling_next_reserve()Find the next job to be submited, according to the scheduling method_name. It does not start the job, but status it as READY, and reserve the resourceStatus and attribute it the job idQueues$scheduler->queues_check()Make a tour of the queue and see that if they are attributed to a job, the job is no ended...$scheduler->__queues_exist($qname)Check if the queue exists. It is not straight forwards because of queue that can be dynamically defined at runtime. In this case, regexp must be checked, and queue duplicated...For example, if a queue was defined in the config file with name "default_user_w+", it will be possible to submit to queues "default_user_joe", "default_user_jack" etc. These queues will be dynamically created when $scheduler->__queues_exist($qname) is called$scheduler->__queue_validResource($qname, %resource)Check if the given resource correspond to the queue needs$scheduler->__queue_insert(job=>%job, queue=>$queuename, resourceStatus=%resourceStatus);Insert a job in a queue, deal with all labeling, queue counter etc. etc.$scheduler->__queue_remove(job=>%job );Remove a job from a queue, deal with all labeling, queue counter etc. etc.Default jobstatus is EXITQueues statusstores the queuse status (last acession time...)$scheduler->queuesStatus_init()Synchronize data with dump fileIO$scheduler->readConfig(twigelt=>XML::Twig::Elt)Read its config from an xml file (see examples/ dir)overloading "$scheduler"just a call to $scheduler->toString()$scheduler->toString(,Returns a string with the status for the different components$scheduler->dataRequest(request=>'req1,req2...')request data (rpc oriented)Requirements:· Perl Requirements: · Perl


BatchSystem::SBS::DefaultScheduler Related Software