Main Page | Modules | Data Structures | File List | Data Fields | Globals

Service Thread
[Core module]


Functions

int fsf_set_service_thread_data (const struct timespec *budget, const struct timespec *period, bool *accepted)
int fsf_get_service_thread_data (struct timespec *budget, struct timespec *period)

Detailed Description

These functions are to the initialization and tuning of the service thread.

Implementation dependency: in the fixed priority implementation of fsf, the default priority is lower than the priority of any server, but higher than the background. According to the implementation-dependent module the priority is adjustable by means of a function that changes its preemption level.


Function Documentation

int fsf_get_service_thread_data struct timespec *  budget,
struct timespec *  period
 

this function returns in the variables pointed by budget and period, respectively, the current budget and period of the service thread.

Parameters:
[out] budget current budget of the service thread
[out] period current period of the service thread
Return values:
FSF_ERR_BAD_ARGUMENT if any of the pointer arguments is NULL
FSF_ERR_NOT_SCHEDULED_CALLING_THREAD if the calling thread is not scheduled under the FSF
FSF_ERR_INVALID_SCHEDULER_REPLY the scheduler is wrong or not running
FSF_ERR_NOT_CONTRACTED_SERVER if the server of the calling thread has been cancelled or it is not valid

int fsf_set_service_thread_data const struct timespec *  budget,
const struct timespec *  period,
bool *  accepted
 

This function allows the application to change the period and budget of the service thread that makes the negotiations. Increasing the utilization of this thread makes the negotiations faster, but introduces additional load in the system that may decrease the bandwidth available for the servers. For this call, the system will make a schedulability analysis to determine if the new situation is acceptable or not. This is reported back in the variable pointed to by accepted. If the new service thread data is accepted, the system will reassign budgets and periods to the servers according to the new bandwidth available, in the same way as it does for a regular contract negotiation.

When its budget is exhausted, the service thread may run in the background.

The service thread starts with a default budget and period that are configurable.

Parameters:
[in] budget budget for the service thread
[in] period for the service thread
[out] accepted true is the change has been accepted
Return values:
0 is the operation is succesful
FSF_ERR_BAD_ARGUMENT if any of the pointer arguments is NULL or the budget value is greater than the period value
FSF_ERR_NOT_SCHEDULED_CALLING_THREAD if the calling thread is not scheduled under the FSF
FSF_ERR_INVALID_SCHEDULER_REPLY the scheduler is wrong or not running
FSF_ERR_NOT_CONTRACTED_SERVER if the server of the calling thread has been cancelled or it is not valid


Generated on Tue Apr 5 17:01:27 2005 for FSF by doxygen 1.3.4