User loginNavigation |
Garbage collecting computationsImagine a process starting two computations, and as soon as one of them returns, abandoning the other. One way to implement this is to require the client process to explicitly request cancellation of the second computation. I see this as similar to manual management of memory, with all the benefits and drawbacks. Another way is to use something similar to garbage collector - the client just forgets about the second computation, and it will be (eventually) cancelled. I like to think about this as a GC because (as with memory GC) there are no semantic guarantees, just a pragmatic one - the infrastructure will have an option to reduce the consumption of resources, but does not guarantee it will use it (e.g., the resources are in abundance - a lot of free physical memory or idle processors). Similar to memory GC, there might be ways for the process to detect the infrastructure's decision - in case of memory by means of finalizer code being called, in case of computation by detecting the effects of the computation. What is not so similar, is the nature of references. In case of memory, clients refer to memory blocks. In case of computations, the direction is reversed - the computation refers to the continuation supplied by the client. That looks like a fatal blow... I vaguely remember reading about something like that in the context of speculative computations, but was unable to find it again. Any ideas where to look? By Andris Birkmanis at 2005-04-15 11:05 | LtU Forum | previous forum topic | next forum topic | other blogs | 10708 reads
|
Browse archives
Active forum topics |
Recent comments
27 weeks 2 days ago
27 weeks 2 days ago
27 weeks 2 days ago
49 weeks 3 days ago
1 year 1 week ago
1 year 3 weeks ago
1 year 3 weeks ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 10 weeks ago