-
Notifications
You must be signed in to change notification settings - Fork 0
Event
Interference can be caused by the contention on the application-level resource such as a task queue or an application-level mutex. Since this type of resource contention is oblivious to the operation system, we provide a API for the application to notify the PerfSandbox this type of event.
When the activity competes for an application resource, it should call the
int update_psandbox(struct sandboxEvent *event, PSandbox *p_sandbox);
The update_psandbox notify the p_sandbox there is an event happening. The PerfSandbox defines three types of events:
enum enum_event_type {
PREPARE,
ENTER,
EXIT,
};
-
The PREPARE event indicates that the PerfSandbox prepares to compete the resource. It should be called before the activity begins to compete for the resource. After the PREPARE event, the activity enters the waiting state, which means that the activity is currently waiting for the resource and the waiting time is the delaying time.
-
The ENTER event indicates that the PerfSandbox successfully owns the resource and it will perform other tasks while holding the resource. After the ENTER event the activity enters the OWNER state, which means that the activity currently owns some resource.
-
The EXIT event indicate that the PerfSandbox release the resource and the other PerfSandbox now have a changes to own the resource.