Real-time signal handling in guest and host operating systems
First Claim
1. A method comprising,providing an operating system process, the operating system process executing application code portions, system calls of a host operating system, and system calls of a guest operating system, the guest operating system being embedded in the host operating system, the operating system process comprising a worker thread dedicated to executing the application code portions such that when started the worker thread creates an associated signal-waiter thread dedicated to handling specific signals from the host operating system and the worker thread being masked to signals from the host operating system to the operating system process to prevent interruption of the flow of execution of the worker thread;
- and,catching a specific signal of the signal-waiter thread from the host operating system, the catching further comprisingin response to the specific caught signal while the worker thread is executing a system call of the host operating system, the signal-waiter thread protecting the worker thread from executing application code portions and system calls of the guest operating system,the signal-waiter thread executing code portions for handling signals from the guest operating system adapted to the specific signal from the host operating system, and,the signal-waiter thread allowing the worker thread to execute application code portions and system calls of the guest operating system after the signal-waiter thread has finished handling the specific signal; and
whereinthe signal-waiter thread is protecting the worker thread from executing application code portions and system calls of the guest operating system by acquiring a mutex lock,the signal-waiter thread is allowing the worker thread to execute application code portions and system calls of the guest operating system by releasing the mutex lock,the error handling performed by the worker thread is triggered when the worker thread fails to acquire the mutex lock because the signal-waiter thread has ended abnormally while owning the mutex lock.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention relates to signal handling in a host operating system process executing code portions of a single- or multi-threaded application and of the embedded guest operating system. When a signal is sent from the host operating system to the operating system process, the signal handler of the guest operating system will be invoked in a deterministic time, independent of the operating system process executing code portions of the application or of the guest operating system or executing system calls of the host operating system in a masked or non-masked operation.
7 Citations
14 Claims
-
1. A method comprising,
providing an operating system process, the operating system process executing application code portions, system calls of a host operating system, and system calls of a guest operating system, the guest operating system being embedded in the host operating system, the operating system process comprising a worker thread dedicated to executing the application code portions such that when started the worker thread creates an associated signal-waiter thread dedicated to handling specific signals from the host operating system and the worker thread being masked to signals from the host operating system to the operating system process to prevent interruption of the flow of execution of the worker thread; - and,
catching a specific signal of the signal-waiter thread from the host operating system, the catching further comprising in response to the specific caught signal while the worker thread is executing a system call of the host operating system, the signal-waiter thread protecting the worker thread from executing application code portions and system calls of the guest operating system, the signal-waiter thread executing code portions for handling signals from the guest operating system adapted to the specific signal from the host operating system, and, the signal-waiter thread allowing the worker thread to execute application code portions and system calls of the guest operating system after the signal-waiter thread has finished handling the specific signal; and
whereinthe signal-waiter thread is protecting the worker thread from executing application code portions and system calls of the guest operating system by acquiring a mutex lock, the signal-waiter thread is allowing the worker thread to execute application code portions and system calls of the guest operating system by releasing the mutex lock, the error handling performed by the worker thread is triggered when the worker thread fails to acquire the mutex lock because the signal-waiter thread has ended abnormally while owning the mutex lock. - View Dependent Claims (2, 3, 4, 5, 6, 7)
- and,
-
8. A system comprising,
a processor; -
a data bus coupled to the processor; and
,a computer usable medium embodying computer program code, the computer usable medium being coupled to the data bus, the computer program code comprising instructions executable by the processor and configured for; providing an operating system process, the operating system process executing application code portions, system calls of a host operating system, and system calls of a guest operating system, the guest operating system being embedded in the host operating system, the operating system process comprising a worker thread dedicated to executing the application code portions such that when started the worker thread creates an associated signal-waiter thread dedicated to handling specific signals from the host operating system and the worker thread being masked to signals from the host operating system to the operating system process to prevent interruption of the flow of execution of the worker thread; and
,catching a specific signal of the signal-waiter thread from the host operating system, the catching further comprising in response to the specific caught signal while the worker thread is executing a system call of the host operating system, the signal-waiter thread protecting the worker thread from executing application code portions and system calls of the guest operating system, the signal-waiter thread executing code portions for handling signals from the guest operating system adapted to the specific signal from the host operating system, and, the signal-waiter thread allowing the worker thread to execute application code portions and system calls of the guest operating system after the signal-waiter thread has finished handling the specific signal; and
whereinthe signal-waiter thread is protecting the worker thread from executing application code portions and system calls of the guest operating system by acquiring a mutex lock, the signal-waiter thread is allowing the worker thread to execute application code portions and system calls of the guest operating system by releasing the mutex lock, the error handling performed by the worker thread is triggered when the worker thread fails to acquire the mutex lock because the signal-waiter thread has ended abnormally while owning the mutex lock. - View Dependent Claims (9, 10, 11, 13, 14)
-
-
12. A system comprising,
a processor; -
a data bus coupled to the processor; and
,a computer usable medium embodying computer program code, the computer usable medium being coupled to the data bus, the computer program code comprising instructions executable by the processor and configured for; providing an operating system process, the operating system process executing application code portions, system calls of a host operating system, and system calls of a guest operating system, the guest operating system being embedded in the host operating system, the operating system process comprising a worker thread dedicated to executing the application code portions such that when started the worker thread creates an associated signal-waiter thread dedicated to handling specific signals from the host operating system and the worker thread being masked to signals from the host operating system to the operating system process to prevent interruption of the flow of execution of the worker thread; and
,catching a specific signal of the signal-waiter thread from the host operating system, the catching further comprising in response to the specific caught signal while the worker thread is executing a system call of the host operating system, the signal-waiter thread protecting the worker thread from executing application code portions and system calls of the guest operating system, the signal-waiter thread executing code portions for handling signals from the guest operating system adapted to the specific signal from the host operating system; the signal-waiter thread allowing the worker thread to execute application code portions and system calls of the guest operating system after the signal-waiter thread has finished handling the specific signal; in response to the specific caught signal and while the worker thread is not executing a system call of the host operating system and the worker thread is not masked to signals from the guest operating system, the signal-waiter thread invoking the worker thread to execute code portions for handling signals from the guest operating system adapted to the specific signal.
-
Specification