著者
森住 大樹 小宮 常康 八杉 昌宏 湯淺 太一
出版者
一般社団法人情報処理学会
雑誌
情報処理学会論文誌プログラミング(PRO) (ISSN:18827802)
巻号頁・発行日
vol.45, no.12, pp.94-94, 2004-11-15

実時間処理を妨げる要因の1 つとしてごみ集めがあげられる.ごみ集めが一括して行われる場合には,その間プログラムの実行は一時的に停止することとなり,実時間処理の妨げとなる.この問題に対処するため,実時間処理に対応したごみ集めも考慮されているが,Real-Time Specification forJava(RTSJ)では,ごみ集めの方式自体には制限を加えることなく,実時間処理を可能としている.Lisp もごみ集めの機能を持つプログラミング言語の1 つである.本発表では,RTSJ の方法を取り入れることによって実時間処理にも利用できるように設計,実装したLisp を紹介する.具体的には,従来のヒープとは別にスコープメモリと呼ばれる実時間処理用のメモリ領域を導入する.スコープメモリはごみ集めにより使用済みのメモリ領域を回収するのではなく,ある程度の大きさでまとめて確保し,必要がなくなったら一度に破棄する.細かいメモリ管理の手間が必要なく,使用中のデータの破棄やメモリリークの恐れもない設計となっており,ごみ集めの利便性を損なうこともない.実装にあたっては,Java により記述されたScheme 処理系であるJAKLD とRTSJ を満たすJava 処理系を組み合わせることにより,効率良く実装を行うことを可能とした.Lisp に新たに追加する機能はRTSJ のJava 処理系にも含まれるものであり,実装ではJAKLD を改良しJava の機能を有効利用した.また,JAKLD を基に作成されたL 処理系に対しても,設計と実装を行った.実装されたLisp 処理系は,それ自身十分に動作するものであり,また,より高性能の本格的な処理系を作成する際に参考となりうるものでもある.Design and Implementation of Lisp System with Memory Management suitable for Real-Time Processing. Garbage collection (GC) is one of the factors obstruct real-time processing. In case that GC is executed at a time, it stops temporarily execution of program and obstructs real-time processing. For the purpose of dealing with this problem, GC corresponding to realtime processing are devised, but Real-Time Specification for Java (RTSJ) realizes real-time processing without adding restrictions to a method of GC itself. Lisp is one of programming languages with GC. At this presentation, we introduce Lisp which is designed and implemented for real-time processing by taking in the method of RTSJ. Specifically, the memory area called scope memory for real-time processing is introduced apart from the conventional heap. At a scope memory area, GC does not collects used memory, but a certain size memory is secured at a time and deleted at a time if it is not necessary. Because it is designed not to need complicated work for memory management and not to concern about deletion of necessary data and memory leak, the convenience of GC is not spoiled. It made the implementation efficient to combine JAKLD which is a Scheme system described by Java and a Java system of RTSJ. The function newly added to Lisp is included also in a Java system of RTSJ, and the function of Java was available at the implementation by improving JAKLD. We also designed and implemented to L system created from JAKLD. The implemented Lisp system works enough in it self, and it may also be referred when a more highly efficient system is created.