🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.mach
Article #1079

task_self() returns invalid port!

#1079
From: SARRAF
Date: Tue, 15 Dec 1992 00:09
39 lines
1894 bytes
Hi Everyone,


	I am experiencing a peculiar problem. What I am trying to do
is restore the state of a task as saved previously on secondary storage.
This is done by having a task perform a unix_fork and then
using the child task as a "template" for the virtual memory 
information that was previously stored to disk. (Note
that the state of the task is also saved using a child task
as a virtual memory template in a similar way.) 

 Once the parent task has recopied the virtual memory
from disk to the child task (using vm_region,vm_allocate, vm_protect,
vm_inherit) it kills itself and lets the child continue.


	This works fine except for when I try to do anything
dealing with the port space. The problem is that after restoring 
the state into the child , I try to perform a port_allocate but
it doesn't work. I pinpointed the error to the fact that
task_self() is returning an invalid port. I have no idea
why. Is there something I should watch out for when 
deallocating the child's memory to give room for the 
new virtual memory?


There is a paper in the October 1990 Usenix conference called
"Transparent Recovery of Mach Applications" by
Goldberg, Gopal, Li, Strom, and Bacon. This paper discusses
a similar scenario. Does anyone have any information
of what I may be doing wrong? Any help would
be GREATLY appreciated.

Alain

PS. Could you please send any replies to alain@cs.concordia.ca as
I don't usually get a chance to read news. Thanks again
 
 
Technical Details
Message-ID: <5553@daily-planet.concordia.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!newsflash.concordia.ca!daily-planet.concordia.ca!alain

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!newsflash.concordia.ca!daily-planet.concordia.ca!alain
From: alain@cs.concordia.ca (SARRAF)
Newsgroups: comp.os.mach
Subject: task_self() returns invalid port!
Message-ID: <5553@daily-planet.concordia.ca>
Date: 15 Dec 92 00:09:44 GMT
Sender: usenet@daily-planet.concordia.ca
Organization: Computer Science, Concordia University, Montreal, Quebec
Lines: 41