{"title":"通过即时编译器运行特定于应用程序的内核代码","authors":"Ake Koomsin, Yasushi Shinjo","doi":"10.1145/2818302.2818305","DOIUrl":null,"url":null,"abstract":"Kernel scripting is a technique to run an extension code in a script language in an operating system kernel. Conventional kernel scripting has two limitations. First, it affects an entire system and only privileged users are allowed to install a new script. This prohibits developers from running their own application-specific code in the kernel. Second, its performance is not sufficient for some time-sensitive applications. In this paper, we address these problems. Our system call scripting allows developers to run their own application-specific code in the kernel without the root privilege. Our system call scripting runs with less overhead because we use a Just-In-Time (JIT) compiler. To evaluate our idea, we ported the LuaJIT compiler into the FreeBSD 10.1 x86 kernel. We modified Memcached to use system call scripting that processes multiple UDP GET requests at a time. With one worker thread and under a high-load condition, we achieved a 33% reduction in the average response time and a 44% improvement in the throughput when the response value size was small.","PeriodicalId":170899,"journal":{"name":"Proceedings of the 8th Workshop on Programming Languages and Operating Systems","volume":"10 4 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2015-10-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Running application specific kernel code by a just-in-time compiler\",\"authors\":\"Ake Koomsin, Yasushi Shinjo\",\"doi\":\"10.1145/2818302.2818305\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Kernel scripting is a technique to run an extension code in a script language in an operating system kernel. Conventional kernel scripting has two limitations. First, it affects an entire system and only privileged users are allowed to install a new script. This prohibits developers from running their own application-specific code in the kernel. Second, its performance is not sufficient for some time-sensitive applications. In this paper, we address these problems. Our system call scripting allows developers to run their own application-specific code in the kernel without the root privilege. Our system call scripting runs with less overhead because we use a Just-In-Time (JIT) compiler. To evaluate our idea, we ported the LuaJIT compiler into the FreeBSD 10.1 x86 kernel. We modified Memcached to use system call scripting that processes multiple UDP GET requests at a time. With one worker thread and under a high-load condition, we achieved a 33% reduction in the average response time and a 44% improvement in the throughput when the response value size was small.\",\"PeriodicalId\":170899,\"journal\":{\"name\":\"Proceedings of the 8th Workshop on Programming Languages and Operating Systems\",\"volume\":\"10 4 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2015-10-04\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 8th Workshop on Programming Languages and Operating Systems\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2818302.2818305\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 8th Workshop on Programming Languages and Operating Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2818302.2818305","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Running application specific kernel code by a just-in-time compiler
Kernel scripting is a technique to run an extension code in a script language in an operating system kernel. Conventional kernel scripting has two limitations. First, it affects an entire system and only privileged users are allowed to install a new script. This prohibits developers from running their own application-specific code in the kernel. Second, its performance is not sufficient for some time-sensitive applications. In this paper, we address these problems. Our system call scripting allows developers to run their own application-specific code in the kernel without the root privilege. Our system call scripting runs with less overhead because we use a Just-In-Time (JIT) compiler. To evaluate our idea, we ported the LuaJIT compiler into the FreeBSD 10.1 x86 kernel. We modified Memcached to use system call scripting that processes multiple UDP GET requests at a time. With one worker thread and under a high-load condition, we achieved a 33% reduction in the average response time and a 44% improvement in the throughput when the response value size was small.