top of page

Scheduler Implementation - Sequential Processing

  • תמונת הסופר/ת: Remi Bettan
    Remi Bettan
  • 29 במרץ 2016
  • זמן קריאה 1 דקות

The scheduler has been required to follow the following instructions:

- insert the tasks entered by the user to a Data Structure. Each Task is entered by the user with the inputs: task function, task data, task interval.

- run the scheduler while the next task to run shall be the one with the least next running time.

- after each task running, the task function shall return SUCCESS, ERROR, or END:

@SUCCESS: the task shall be reinserted to the scheduler, with its next running time updated to its ending time postponed by its task interval (entered by the user at the task definition).

@ERROR & END: the task shall not be reinserted to the scheduler.

- the scheduler shall stop running when it is empty of tasks.

First Step of this project was designing the API - this step has been performed within a team of 4 programmers. During this step, the decisions taken were:

- definition of the modules and dependencies between them:

i. Scheduler.o :Main Functions: Scheduler_Create, Scheduler_Destroy,Scheduler_AddTask, Scheduler_Run.

ii. Task.o : Main Functions: Task_Create, Task_Destroy, Task_Perform.

iii. Time.o: The time structure used was timespec, which has a member in sec and a member in nanoseconds. Main Functions: Time_AddTimespecs, Time_SubsTimespecs, Time_SubsTimespecFromCurrentTime.

After this design step, the implementation of the whole project has been done completely by each programmer.

When the program ran correctly, other requirements were added, as pausing the scheduler, inserting a task at some time after the starting of the scheduler running, using a self programmed logger to record the tasks' functions return value (SUCCESS, ERROR, END).

See the following pics from the execution of the scheduler in terminal and from the logger file:


 
 
 

תגובות


The Science & 

Mathematics University

© 2023 by Scientist Personal. Proudly created with Wix.com

  • Facebook Clean Grey
  • Twitter Clean Grey
  • LinkedIn Clean Grey
bottom of page