This invention relates to a method for adding functionality to a computing device, and in particular to how a plurality of thread call tables in an operating system (OS) kernel can be used to add functionality to a computing device.
It is often advantageous for manufacturers of certain types of devices and others who are seeking to implement existing computing technology on new platforms to try to reuse their existing software materials. This is especially true for consumer devices such as mobile telephones, which tend to have a short market life compared to the time invested in their development; anything that decreases the development cycle and reduces development cost improves manufacturing efficiency.
Communications stacks and protocol implementations are good examples of the software material that manufacturers seek to reuse in modern consumer electronic devices; there is an increasing trend for such devices to converge, and communications and networking capabilities will increasingly be required in many diverse situations and devices. Such software tends to have the following features in common:
Such software is referred to below as a legacy real time applications (LRTA). There are a number of ways of incorporating an LRTA on to a new platform.
A very straightforward method is by running the LRTA components on their own CPU, separate from the one that handles the functionality on the rest of the device. There are some advantages to this solution: the LRTA need not be modified and the fact that it is completely isolated from rest of the software on the new device reduces the integration burden.
However, there are also disadvantages: the most notable ones are the cost of the extra processor required and the accompanying memory.
Because of the downward cost pressures on modern computing devices, which are mainly responsible for decisions to use the LRTA in the first place, it will usually be the case that the separate processor solution will be rejected as being too expensive. This means that the LRTA must be run on the same CPU as the remainder of the software on the device, and will need to be run under its native operating system (OS). Those skilled in the art will be aware that there are three ways of achieving this:
The present invention adopts the personality layer solution outlined above. However, current methods of implementing personality layers require a significant programming overhead. This invention proposes a faster and more elegant scheme for implementing such layers.
According to a first aspect of the present invention there is provided a method of implementing a personality layer for an alien operating system on a computing device running a native operating system which enables software written for the said alien operating system to run on the device, the method comprising;
According to a second aspect of the present invention there is provided a computing device arranged to operate in accordance with a method of the first aspect.
According to a third aspect of the present invention there is provided an operating system for causing a computing device to operate in accordance with a method of the first aspect.
An embodiment of the invention will now be described, by way of further example only, with reference to the accompanying drawings, in which:—
It is usual for system calls in an operating system to be made via some type of jump table. The addresses of the available functions are arranged in a dispatch table with fixed-length entries, and a single entry point for all system calls is provided; this is an address in the kernel. The caller calls the same address for every function, but provides the number of the call they want to make; the number is used to calculate the offset of the address of the actual function required in the dispatch table, and control is passed to that function.
Existing operating systems set up threads of execution in such a way that all threads are provided with the same entry point for making system calls, which all use the same dispatch table.
In this invention, the entry point to the kernel remains the same for all threads and all system calls. However, each thread has its own dispatch table for system calls.
All native OS threads are set up with the same dispatch table, which enables them to access the system calls usually made available under the OS. A dispatch table for native OS executables is shown on the left hand side of
However, alien threads which need to run in a personality layer provided inside the OS are set up with different dispatch tables. Thus, when alien threads make a system call, they are vectored off by this different table, which provides them with the functionality they would expect from the alien OS for which they were originally written. A dispatch table for personality layer executables is shown on the right hand side of
However, if it is determined that the executable is not written for the OS native to the device, the device next determines what OS the executable was written for and the executable is set up with a dispatch table for a personality layer which is appropriate for the OS that the executable was written for so that it is provided with the functionality for it to be able to run on the device.
This invention enables, therefore, multiple personality layers to be implemented for multiple RTOSs thus enabling multiple LRTAs to run on the same device while maintaining real time performance. It can also be used for debugging/diagnostic purposes because it is possible to install a new call table for a given thread which redirects all attempts by that thread to use kernel functionality to a debugger.
Although the present invention has been described with reference to particular embodiments, it will be appreciated that modifications may be effected whilst remaining within the scope of the present invention as defined by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
0516438 | Aug 2005 | GB | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/GB06/02962 | 8/8/2006 | WO | 00 | 6/16/2010 |