| 摘要: |
| 详细介绍了国产开放系统平台Java虚拟机多线程的设计与实现.在线程调度上,采用带有独立队列的静态级别轮巡调度,较好地解决了独立循环线程的调度问题.对于线程的同步,采用了哈希混合锁的设计方案.实验结果证明,该锁具有空间小、执行效率高等特点. |
| 关键词: Java,虚拟机,线程. |
| DOI: |
| 分类号: |
| 基金项目:本文研究得到国家"九五"重点科技攻关项目基金(No.96-737)资助. |
|
| Design and Implementation of User Level Multi-Threads in Java Virtual Machine |
|
DING Yu-xin,CHENG Hu
|
| Abstract: |
| In this paper, the authors discuss the design and implementation of Java multi-threads. A new thread scheduling algorithm, named Preemptive Round-Robin Scheduling with a Free Queue, is presented. Under this policy threads in the free queue are not assigned with a constant priority. Their priority is the same as the highest-priority threads which are in running state. The highest-priority threads and the threads in the free queue are time-sliced scheduled. This algorithm solves the scheduling problem for independent looping thread. To improve the efficiency of thread synchronization, a new design for object lock is presented. It is called the Mixed Hash Object Lock. This design is a tradeoff between the lock efficiency and its space. The experimental results have proved that the design is feasible. Compared with the traditional design, the efficiency for locking and unlocking is high and the space allocated to lock is small. |
| Key words: Java, virtual machine, thread. |