{"title":"在Ada中设计和实现一个运行时任务管理器","authors":"Ed Falis","doi":"10.1145/3304133.3304135","DOIUrl":null,"url":null,"abstract":"A runtime supervisor is an Ada package in the standard environment which provides a scheduling interface between a compiled tasking program and the virtual machine upon which it is to execute. Its visible operations implement the more complex aspects of the tasking dynamic semantics. These operations are very high level in the sense that they conform closely to Ada tasking constructs. Internal to the supervisor is a small kernel of machine dependent code providing the actual interface to the target virtual machine. Given this kind of runtime environment, the compiled code of a tasking program is equivalent to the code generated by a compilation of sequential Ada constructs with embedded calls to the supervisor visible operations. All parallelism is abstracted out of the program prior to the code generation phase of the compilation, and the implementation of the parallel constructs of the Ada language is shifted into the runtime supervisor package. While the form of the sequential Ada code implementing tasking constructs will depend on design decisions made by the implementors of specific compilers as in [3] and [5], a carefully designed supervisor will be compatible with the code generated by any Ada compiler calling that supervisor's visible operations in the specified manner. The benefits of this approach, which was originally adopted for the design of the experimental Adam compiler [4], are apparent. Target machine dependent aspects of scheduling, and details of scheduling strategies are separated from compilation. The code generation phase of the Ada compiler is greatly simplified by factoring out all tasking related routines. Compiler builders need not reimplement all of tasking for each new compiler or intended target machine. In addition, experimental and special purpose supervisors will gain wider distribution and evaluation due the portability inherent in this approach. In this paper we analyze the feasibility of implementing a runtime supervisor in Ada, pointing out those areas in which the Ada language is weak for this purpose. We then derive a standard supervisor interface on the basis of a (hopefully) minimal set of facilities to be provided by any supervisor. In this derivation, we consider in detail both what must be provided if a supervisor is to implement the full tasking semantics, and also in what ways we can minimize constraints on compiler builders who plan to use the interface.","PeriodicalId":304626,"journal":{"name":"Proceedings of the AdaTEC Conference on Ada","volume":"19 9","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1982-10-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":"{\"title\":\"Design and implementation in Ada of a runtime task supervisor\",\"authors\":\"Ed Falis\",\"doi\":\"10.1145/3304133.3304135\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A runtime supervisor is an Ada package in the standard environment which provides a scheduling interface between a compiled tasking program and the virtual machine upon which it is to execute. Its visible operations implement the more complex aspects of the tasking dynamic semantics. These operations are very high level in the sense that they conform closely to Ada tasking constructs. Internal to the supervisor is a small kernel of machine dependent code providing the actual interface to the target virtual machine. Given this kind of runtime environment, the compiled code of a tasking program is equivalent to the code generated by a compilation of sequential Ada constructs with embedded calls to the supervisor visible operations. All parallelism is abstracted out of the program prior to the code generation phase of the compilation, and the implementation of the parallel constructs of the Ada language is shifted into the runtime supervisor package. While the form of the sequential Ada code implementing tasking constructs will depend on design decisions made by the implementors of specific compilers as in [3] and [5], a carefully designed supervisor will be compatible with the code generated by any Ada compiler calling that supervisor's visible operations in the specified manner. The benefits of this approach, which was originally adopted for the design of the experimental Adam compiler [4], are apparent. Target machine dependent aspects of scheduling, and details of scheduling strategies are separated from compilation. The code generation phase of the Ada compiler is greatly simplified by factoring out all tasking related routines. Compiler builders need not reimplement all of tasking for each new compiler or intended target machine. In addition, experimental and special purpose supervisors will gain wider distribution and evaluation due the portability inherent in this approach. In this paper we analyze the feasibility of implementing a runtime supervisor in Ada, pointing out those areas in which the Ada language is weak for this purpose. We then derive a standard supervisor interface on the basis of a (hopefully) minimal set of facilities to be provided by any supervisor. In this derivation, we consider in detail both what must be provided if a supervisor is to implement the full tasking semantics, and also in what ways we can minimize constraints on compiler builders who plan to use the interface.\",\"PeriodicalId\":304626,\"journal\":{\"name\":\"Proceedings of the AdaTEC Conference on Ada\",\"volume\":\"19 9\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1982-10-06\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"7\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the AdaTEC Conference on Ada\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3304133.3304135\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the AdaTEC Conference on Ada","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3304133.3304135","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Design and implementation in Ada of a runtime task supervisor
A runtime supervisor is an Ada package in the standard environment which provides a scheduling interface between a compiled tasking program and the virtual machine upon which it is to execute. Its visible operations implement the more complex aspects of the tasking dynamic semantics. These operations are very high level in the sense that they conform closely to Ada tasking constructs. Internal to the supervisor is a small kernel of machine dependent code providing the actual interface to the target virtual machine. Given this kind of runtime environment, the compiled code of a tasking program is equivalent to the code generated by a compilation of sequential Ada constructs with embedded calls to the supervisor visible operations. All parallelism is abstracted out of the program prior to the code generation phase of the compilation, and the implementation of the parallel constructs of the Ada language is shifted into the runtime supervisor package. While the form of the sequential Ada code implementing tasking constructs will depend on design decisions made by the implementors of specific compilers as in [3] and [5], a carefully designed supervisor will be compatible with the code generated by any Ada compiler calling that supervisor's visible operations in the specified manner. The benefits of this approach, which was originally adopted for the design of the experimental Adam compiler [4], are apparent. Target machine dependent aspects of scheduling, and details of scheduling strategies are separated from compilation. The code generation phase of the Ada compiler is greatly simplified by factoring out all tasking related routines. Compiler builders need not reimplement all of tasking for each new compiler or intended target machine. In addition, experimental and special purpose supervisors will gain wider distribution and evaluation due the portability inherent in this approach. In this paper we analyze the feasibility of implementing a runtime supervisor in Ada, pointing out those areas in which the Ada language is weak for this purpose. We then derive a standard supervisor interface on the basis of a (hopefully) minimal set of facilities to be provided by any supervisor. In this derivation, we consider in detail both what must be provided if a supervisor is to implement the full tasking semantics, and also in what ways we can minimize constraints on compiler builders who plan to use the interface.