Java 處理器上的記憶體分配電路設計
Memory Allocation Circuit Design for Java Processor
摘要
本論文以一顆內建電路化作業系統硬體的Java處理器, JAIP SoC, Java為基礎,設計一個hardware memory allocator,藉由此電路能有效地讓有限的記憶體空間使用上更有效率,同時也能讓處理器以及其他應用IP共享此電路達到記憶體共享的功能。而當處理器需要一塊記憶體時,能在固定的時間內回傳記憶體的起始位置,而當garbage collection unit進行回收而釋放的記憶體空間也是藉由此電路來管理,由於安全性的考量,會把釋放回來的記憶體初始化,而無論是分配記憶體或者是釋放記憶體所要維持的資料結構,通通都是在背景時間做更新,並不會影響處理器的效能,而在記憶體破碎的問題,在本論文中也有加以處理,最後的實驗數據中,hardware memory allocator比software memory allocator快上數十倍。整個設計都是在Xilinx FPGA上實作及驗證,並整合至現有的JAIP中。
This thesis is developed based on a JAIP SoC, a Java processor with hardwired OS kernel. We propose a hardware memory allocator that will improve the memory utilization efficiency for dynamic memory allocation/free operations and allow many processors and IP cores to access a shared memory. Once our allocator circuit receives a request for memory allocation, it will return the pointer in a fixed time and manage the memory space released by the garbage collection unit. In addition, the released memory will be initialized to ensure the security. Our allocator circuit will not affect the processor’s performance during the memory allocation and de-allocation because the data structure is updated in the background. The memory fragmentation problem will also be handled in this research. The final experimental results show that our hardware memory allocator is an order faster than the software memory allocator. The whole design is implemented and verified on a Xilinx FPGA and integrated into the JAIP SoC.