Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Running application specific kernel code by a just-in-time compiler
Koomsin A., Shinjo Y.  PLOS 2015 (Proceedings of the 8th Workshop on Programming Languages and Operating Systems, Monterey, CA, Oct 4, 2015)15-20.2015.Type:Proceedings
Date Reviewed: Jan 4 2016

Kernel scripting allows users to dynamically load and execute scripts in the kernel to modify the kernel behavior according to their demands. Existing kernel scripting approaches are mostly performance-intensive and allow only privileged users to install kernel scripts, which affect the entire system. Extending the implementation by Neto et. al. [1], the authors propose system-call scripting for all users (without root permission) based on Lua [2,3] (scripting extension language) in Linux and FreeBSD systems, where the host kernel invokes the in-kernel Lua interpreter to dynamically execute user-defined kernel extension scripts in application scope only, without affecting the entire system, using specific system calls. Lua’s just-in-time (JIT) compiler is modified and used to reduce runtime overhead of the interpreter.

Lua uses a stack to communicate with the application it is integrated into. To implement the application-scope extension, two system calls are provided to all users. One loads the required script (written using Lua based on existing system calls) into a newly created stack at runtime and returns a file descriptor pointing to it, and the second call uses this file descriptor and accepts application arguments from the user space to run the script, after which the result is stored on the stack’s top, to be used by the application. An intermediate module is provided, through which the Lua scripts access kernel memory only after proper validation, for safe execution of scripts. For performance gain, the tracing LuaJIT compiler is modified to run in kernel space as a kernel loadable lightweight module that produces optimized native code for frequently used code-paths for the interpreter to reuse.

The authors evaluated the approach successfully by scripting kernel extensions for the Memcached application [4], to allow multiple transmissions of transmission control protocol/user datagram protocol (TCP/UDP) packets in one mode switch, and reported significant performance gain using the JIT compiler.

The paper is well presented. The approach provides a high-level kernel programming environment and is useful for application developers with prior knowledge of Lua.

Reviewer:  Partha Pratim Das Review #: CR144075 (1603-0208)
1) Neto, L. V.; Ierusalimschy, R.; de Moura, A. L.; Balmer, M. Scriptable operating systems with Lua. Proc. of the 10th ACM Symposium on Dynamic Languages 14 (2014), 2–10.
2) Ierusalimschy, R.; de Figueiredo, L.; Celes Filho, W. Lua: an extensible extension language. Software: Practice and Experience 26, 6(1996), 635–652.
3) Ierusalimschy, R.; de Figueiredo, L.; Celes Filho, W. The evolution of Lua. In Proc. of the 3rd ACM SIGPLAN Conference on History of Programming Languages ACM Press, 2007, 2–26.
4) Fitzpatrick, B. Vorobey, A. Memcached--a distributed memory object caching system, http://memcached.org (12/18/2015).
Bookmark and Share
 
Language Constructs and Features (D.3.3 )
 
 
Organization And Design (D.4.7 )
 
 
Performance (D.4.8 )
 
Would you recommend this review?
yes
no
Other reviews under "Language Constructs and Features": Date
A stub generator for multilanguage RPC in heterogeneous environments
Gibbons P. IEEE Transactions on Software Engineering 13(1): 77-87, 1987. Type: Article
Aug 1 1987
Essentials of programming languages
Friedman D. (ed), Haynes C., Wand M., MIT Press, Cambridge, MA, 1992. Type: Book (9780262061452)
Feb 1 1994
Symbolic computing with Lisp
Cameron R., Dixon A., Prentice-Hall, Inc., Upper Saddle River, NJ, 1992. Type: Book (9780138778460)
Apr 1 1994
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy