From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!dcl-cs!aber-cs!pcg From: pcg@aber-cs.UUCP (Piercarlo Grandi) Newsgroups: comp.lang.ada Subject: Re: Two questions Summary: OS/MVS has multitasking ada, but IMS does not use tasks. Why?... Message-ID: <814@aber-cs.UUCP> Date: 11 Apr 89 13:32:40 GMT Reply-To: pcg@cs.aber.ac.uk (Piercarlo Grandi) Distribution: eunet,world Organization: Dept of CS, UCW Aberystwyth (Disclaimer: my statements are purely personal) List-Id: In article <124000035@inmet> callen@inmet writes: >There is another problem with Ada tasking, and it is well known to those >who know OS/MVS and IMS. When an Ada task takes a page fault, the entire >address space is suspended waiting for resolution of the page fault; This behavior is dependent upon the Ada runtime system implementation. MVS supports its own flavor of tasking, in which several tasks (threads of control) run in the same address space. On a machine with more than one physical processor (which is very common these days), several tasks in the same address space can run simultaneously on different processors. If one of the tasks incurs a page fault, the other tasks do NOT wait. Unfortunately I do not have a multiprocessor MVS system :->. However on this subject, I cited OS/MVS and IMS preceisely because the problem has been solved within them; MVS has one of the few multithreading facilities (if that is the right word :->) around, and among others PL/1 uses it etc... So what you want to look for is an implementation that allows you to map Ada tasks to "true" MVS tasks. There are at least 2. Let me add though that if I were selling an Ada compiler for MVS, I would not boast that it does have real multithreading because it maps Ada tasks onto MVS tasks; I would keep it a closely guarded secret. Why? Easy is the answer: it is fairly obvious that Ada tasking was designed to support a very fine grain of tasking, such as associating tasks with a buffer pool, etc... Too bad that MVS tasks have truly stupendous overheads. IBM are the first to admit this; in an old (early seventies) issue of their Systems Journal (devoted to explaining the new VS2, as it was then called) they discuss how it was decided that the MVS kernel internally would not use MVS tasks, but rather lightweight tasks, precisely because TCBs are too expensive to use in a multithread program like MVS itself. Also, there must be some good reason for which the major IBM databases or communication subsystems or transaction processing systems don't use TCBs... Too bad that those two vendors that you cite as allowing you to map Ada tasks to "true" MVS tasks did not take the trouble of duplicating the IMS or CICS internal schedulers, that do get page fault signals from the MVS kernel. By the way, there is a facility to get page fault signals also in VM, precisely because it is used to run multithreaded operating systems, and these when run under it do use them. On the other hand I must admit that using MVS tasks for Ada tasks, while being quite inappropriate to the Ada style of tasking, does have the advantage of being able to run them on multiple processors, which a simple page fault handling in address space scheduler cannot do. Unles sof course the in address space scheduler runs as multiple MVS tasks (it, not the Ada tasks it manages). I don't really remember well, but some recent version of IMS may do that. Summing up, I thoroughy agree with other posters that Ada really requires a lightweight thread implementation, and most current operating systems do not qualify, either because they do not have threads or because they are not lightweight. And, let me add, wasn't Ada supposed to run on embedded systems where all tasks are lightweight, and there is no notion of address spaces, not to speak of paging? :-] :-] -- Piercarlo "Peter" Grandi | ARPA: pcg%cs.aber.ac.uk@nss.cs.ucl.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcvax!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk