首页> 外文会议>Practical aspects of declarative languages >Implementing Thread Cancellation in Multithreaded Prolog Systems
【24h】

Implementing Thread Cancellation in Multithreaded Prolog Systems

机译:在多线程Prolog系统中实现线程取消

获取原文
获取原文并翻译 | 示例

摘要

The Prolog primitive thread_cancel/1, which simply cancels a thread as recommended in ISO/IEC DTR 13211-5:2007, is conspicuously absent in well-maintained, widely used multithreaded Prolog systems. The ability to cancel a thread is useful for application development and is critical to Prolog embeddability. The difficulty of cancelling a thread is due to the instant mapping of Prolog multithreading primitives to the native-machine thread methods. This paper reports on an attempt to implement thread cancellation using self-blocking threads. A thread blocks at the same safe execution point where the state of the underlying virtual machine is defined. A blocked thread awaits a notification to resume or terminate. A resumed thread may be redirected to self-block by a blocking primitive. Experimental results based on a prototype implementation show that using self-blocking threads not only simplifies the implementation of thread cancellation but also improves the performance of message-passing primitives.
机译:Prolog原语thread_cancel / 1可以按照ISO / IEC DTR 13211-5:2007的建议简单地取消一个线程,但是在维护良好,使用广泛的多线程Prolog系统中显然不存在。取消线程的功能对于应用程序开发很有用,并且对于Prolog的可嵌入性至关重要。取消线程的困难是由于Prolog多线程原语即时映射到本机线程方法。本文报告了使用自阻塞线程实现线程取消的尝试。线程在定义基础虚拟机状态的同一安全执行点处阻塞。被阻塞的线程正在等待通知以恢复或终止。恢复的线程可以通过阻塞原语重定向到自阻塞。基于原型实现的实验结果表明,使用自阻塞线程不仅可以简化线程取消的实现,而且可以提高消息传递原语的性能。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号