Foreign Function Interface for Managed Runtime Systems with Lightweight Threading
An essential class of computer software, such as network servers, achieves concurrency through multiple loosely coupled and possibly long-lasting sessions. In recent years, some programming languages have introduced support for lightweight threading in such applications as an alternative to event-driven frameworks. The lightweight threading model provides an M:n mapping from lightweight to system threads, which provides an ability to write sequential code similar to system threads, but with a much less memory footprint. This model achieves its performance by allowing full control over the scheduling policy in user space without kernel intervention. The problem is that user-space implementations lose the ability to implicitly preempt such threads, which can lead to thread starvation. While the issue with preemption could be addressed in code managed by the runtime, foreign code should be handled differently. This paper examines the aspect of support of the foreign function interface for managed runtime systems that implement lightweight threading. We explore ways to address issues with foreign functions while avoiding performance overhead for foreign function invocations.
Institutions
- Institute of Economics and Industrial Engineering (RU)
Publication Details
- Published
- 2025-06-27
- DOI
- https://doi.org/10.1109/edm65517.2025.11096859
- Primary Topic
- Geochemistry and Geologic Mapping
- Type
- article
- Field-Weighted Citation Impact
- 0.00