首页> 外国专利> Mechanism for enabling a thread unaware or non thread safe application to be executed safely in a multi-threaded environment

Mechanism for enabling a thread unaware or non thread safe application to be executed safely in a multi-threaded environment

机译:使多线程环境中无线程或非线程安全应用程序能够安全执行的机制

摘要

Executing a thread unaware or non-thread-safe application in a multi-threaded environment is potentially hazardous. If multiple instances of the thread unaware application are executed concurrently in the same process space, as may be the case in a multi-threaded environment, one instance may try to modify or overwrite the information used by the other instance, which can lead to serious errors. To enable a thread unaware application to be executed safely in a multi-threaded environment, multiple thread pools are implemented. That is, for each thread-unaware or non-thread-safe application, a separate thread pool is defined and associated with the application. Unlike other thread pools, though, this thread pool has its maximum number of threads parameter set to “1”. By limiting the number of threads in the pool to 1, it is guaranteed that there will be no more than one instance of the thread unaware application executing at any one time. This in turn precludes any possibility of one instance of the application overwriting or modifying the information used by another. By implementing thread pools in this manner, execution of the thread-unaware application in a multi-threaded environment is made safe.
机译:在多线程环境中执行不了解线程或非线程安全的应用程序可能会造成危险。如果在同一进程空间中并发执行不认识线程的应用程序的多个实例(例如在多线程环境中),则一个实例可能会尝试修改或覆盖另一实例所使用的信息,这可能导致严重的后果。错误。为了使无线程意识的应用程序能够在多线程环境中安全地执行,实现了多个线程池。也就是说,对于每个不知道线程或非线程安全的应用程序,将定义一个单独的线程池并将其与该应用程序关联。但是,与其他线程池不同,此线程池将其最大线程数参数设置为“ 1”。通过将池中的线程数限制为1,可以确保在任何一次执行的线程不感知应用程序实例不超过一个。反过来,这排除了应用程序的一个实例覆盖或修改另一实例所使用的信息的任何可能性。通过以这种方式实现线程池,可以确保在多线程环境中执行不知道线程的应用程序的安全。

著录项

  • 公开/公告号US6604125B1

    专利类型

  • 公开/公告日2003-08-05

    原文格式PDF

  • 申请/专利权人 SUN MICROSYSTEMS INC.;

    申请/专利号US20000574314

  • 发明设计人 RUSLAN BELKIN;

    申请日2000-05-19

  • 分类号G06F90/00;

  • 国家 US

  • 入库时间 2022-08-22 00:04:15

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号