| Deutsch English Français Italiano |
|
<lfldplF1kmoU1@mid.individual.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feeds.phibee-telecom.net!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti <niklas.holsti@tidorum.invalid> Newsgroups: comp.arch Subject: Re: Continuations Date: Mon, 15 Jul 2024 23:06:13 +0300 Organization: Tidorum Ltd Lines: 44 Message-ID: <lfldplF1kmoU1@mid.individual.net> References: <v6tbki$3g9rg$1@dont-email.me> <4j389jlb44kuhi3o5igf8ucnks3q9m3lc8@4ax.com> <v714in$1foh$2@gal.iecc.com> <lfims1Fl57mU1@mid.individual.net> <v71jfh$jko$1@gal.iecc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net RSP/jgyZSKmH9APeDEgCXQ8VopOQjAgQNSD26cmgYsbeHG9nKC Cancel-Lock: sha1:9lcZkCx2o+ujJ1szo79jJe7St50= sha256:kpf6q+DkqbimYdKwJ50bt09cmsGs1JaJ5RH83nEVtps= User-Agent: Mozilla Thunderbird Content-Language: en-US In-Reply-To: <v71jfh$jko$1@gal.iecc.com> Bytes: 3227 On 2024-07-14 23:29, John Levine wrote: > According to Niklas Holsti <niklas.holsti@tidorum.invalid>: >>> This programming style is very old. The SAGE air defense system used >>> it in the 1950s, and SABRE copied it in the early 1960s. The software >>> was oranizaed into routines each of which took some input, did >>> something with it, perhaps scheduled other I/O operations, and then >>> explicitly saved its state and returned to the dispatcher. >> >> I think that looks more like a multi-tasking system with >> run-to-completion, non-preemptive (small) tasks, considering each >> "routine" as a task and assuming that each routine started with >> recovering its saved context. > > Right, that saved context is the continuation. Like I said, the tools > these days take care of a lot of the drudge work, e.g. node.js. > >> The main difference to present-day multi-tasking systems is then that >> the context-saving and -restoring was implemented separately and >> specifically in each task, and not in a shared "task switch" function. > > Not really. The context is specific to each routine. It's not like > time-slicing, it's do as much work as you can and then block for I/O. > The context you save depends on what you're doing. Yes yes, as I said, the "tasks" (analogous to routines) are run-to-completion, not time-sliced, and the context save/load is "specifically" in each "task". Special systems like SAGE and SABRE can be viewed with different "eyes" for comparing to current concepts. You look at them with "continuation passing" eyes; I use my "run-to-completion, non-preemptive multitasking" eyes, perhaps because I am more familiar with that kind of SW design. For me the deciding factor in SAGE/SABRE is that the dispatcher, to which each routine performs a call-with-continuation (in your view), is /not/ an application function, but a system function, and is indeed a scheduler that finds some new routine to execute /which the calling routine did not choose/. IMO, for something to qualify as a continuation-passing call, the caller should select the callee -- the thing to be executed next -- but in SAGE/SABRE it is the scheduler that selects what to execute next.