Functions | |
int | fsf_create_synch_obj (fsf_synch_obj_handle_t *synch_handle) |
int | fsf_signal_synch_obj (fsf_synch_obj_handle_t synch_handle) |
int | fsf_destroy_synch_obj (fsf_synch_obj_handle_t synch_handle) |
int | fsf_schedule_timed_job (const struct timespec *abs_time, struct timespec *next_budget, struct timespec *next_period, bool *was_deadline_missed, bool *was_budget_overran) |
int | fsf_schedule_triggered_job (fsf_synch_obj_handle_t synch_handle, struct timespec *next_budget, struct timespec *next_period, bool *was_deadline_missed, bool *was_budget_overran) |
int | fsf_timed_schedule_triggered_job (fsf_synch_obj_handle_t synch_handle, const struct timespec *abs_timeout, bool *timed_out, struct timespec *next_budget, struct timespec *next_period, bool *was_deadline_missed, bool *was_budget_overran) |
These objects are used to synchronize threads belonging to bounded workload servers.
In the future we may add a broadcast operation that would signal a group of synchronization objects. We have not included a broadcast service in this version because it can be easily created by the user by signalling individual synchronization objects inside a loop.
Notice that for synchronization objects there is no naming service like in shared objects because tasks that use synchronization are not developed independently, as they are closely coupled.
|
This operation creates and initializes a synchronization object variable managed by the scheduler, and returns a handle to it in the variable pointed to by synch_handle.
|
|
This operation destroys the synchronization object (created by a previous call to fsf_create_synch_obj) that is referenced by the synch_handle variable. After calling this operation, the synch_handle variable can not be used until it is initialized again by a call to fsf_create_synch_obj.
|
|
This operation is invoked by threads associated with bounded workload servers to indicate that a job has been completed (and that the scheduler may reassign the unused capacity of the current job to other servers). It is also invoked when the first job of such threads has to be scheduled. As an effect, the system will make the current server's budget zero for the remainder of the server's period, and will not replenish the budget until the specified absolute time. At that time, all pending budget replenishments (if any) are made effective. Once the server has a positive budget and the scheduler schedules the calling thread again, the call returns and at that time, except for those parameters equal to NULL pointers, the system reports the current period and budget for the current job, whether the deadline of the previous job was missed or not, and whether the budget of the previous job was overrun or not. In a system with hierarchical scheduling, since this call makes the budget zero, the other threads in the same server are not run. As mentioned abobe, only when the call finishes the budget may be replenished.
|
|
This operation is invoked by threads associated with bounded workload servers to indicate that a job has been completed (and that the scheduler may reassign the unused capacity of the current job to other servers). It is also invoked when the first job of such threads has to be scheduled. If the specified synchronization object has events queued, one of them is dequeued; otherwise the server will wait upon the specified synchronization object, the server's budget will be made zero for the remainder of the server's period, and the implementation will not replenish the budget until the specified synchronization object is signalled. At that time, all pending budget replenishments (if any) are made effective. Once the server has a positive budget and the scheduler schedules the calling thread again, the call returns and at that time, except for those parameters equal to NULL pointers, the system reports the current period and budget for the current job, whether the deadline of the previous job was missed or not, and whether the budget of the previous job was overrun or not. In a system with hierarchical scheduling, since this call makes the budget zero, the other threads in the same server are not run. As mentioned above, only when the call finishes the budget may be replenished.
|
|
This function sends a notification to the synchronization object specified as parameter. If there is at least one server waiting on the synchronization object, the corresponding thread is unblocked, and the server rules for budget recharging apply. If more than one server is waiting, just one of them is woken. However, which one is woken is implementation dependent. If no thread is waiting on the synchronization object, the notification is queued.
|
|
This call is the same as fsf_schedule_triggered_job, but with an absolute timeout. The timed_out argument, indicates whether the function returned because of a timeout or not
|