The most widely deployed mobile virtualization solution
A lot of the problems we are working on today at OK are issues related to performance and minimizing RTOS overheads. In particular, a typical RTOS or application can invoke many microkernel calls that contribute a significant RTOS overhead. For some applications this is not an issue. However, many embedded applications need tomake the most of the available computation cycles, so it is often important that RTOS overheads are low.
At OK, we take a balanced approach to dealing with RTOS overheads by considering a variety of optimizations, design and implementation approaches.
For example, one important RTOS design consideration for minimizing microkernel or inter-process calls is obvious: simply reduce the number of calls. While this may be easier said than done, we frequently see application code that makes unnecessary IPC calls for synchronization. Sometimes a mixed approach works, such as using a combination of IPC and shared memory for synchronizing access or modifications to shared resources.
Another approach we often use is to implement important codepaths by hand-coding them in an architecture's assembly language. Many software engineers believe writing assembly code died in the 80's and is no longer necessary as compilers do a great job at optimizing code.
Unfortunately we find this is not the case, and for our code paths we often reduce the execution overhead down to around a quarter of the previously unoptimized implementation.
While challenging, it is also a lot of fun and rewarding. Writing a code path in assembly requires an understanding of the architecture's instruction set, careful use of instructions to maximize throughput, and care to avoid pipeline stalls or bottlenecks due to limitations of the architecture.
As an engineer at OK, we're glad to still see assembly optimizationsalive and doing well.
Posted by Daniel Potts on February 06 at 09:34 AM
blog comments powered by DisqusAbout Daniel Potts:
Dr. Daniel Potts, Director of Engineering at OK Labs, heads up the engineering team and oversees the development our products. Dan enjoys working closely with his team, and ensuring that they have everything they need to focus on producing high quality products. When not working, you'll find Dan at the beach or swimming laps at the pool.