home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mach / 1644 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  1.8 KB

  1. Path: sparky!uunet!newsflash.concordia.ca!daily-planet.concordia.ca!alain
  2. From: alain@cs.concordia.ca (SARRAF)
  3. Newsgroups: comp.os.mach
  4. Subject: task_self() returns invalid port!
  5. Message-ID: <5553@daily-planet.concordia.ca>
  6. Date: 15 Dec 92 00:09:44 GMT
  7. Sender: usenet@daily-planet.concordia.ca
  8. Organization: Computer Science, Concordia University, Montreal, Quebec
  9. Lines: 41
  10.  
  11. Hi Everyone,
  12.  
  13.  
  14.     I am experiencing a peculiar problem. What I am trying to do
  15. is restore the state of a task as saved previously on secondary storage.
  16. This is done by having a task perform a unix_fork and then
  17. using the child task as a "template" for the virtual memory 
  18. information that was previously stored to disk. (Note
  19. that the state of the task is also saved using a child task
  20. as a virtual memory template in a similar way.) 
  21.  
  22.  Once the parent task has recopied the virtual memory
  23. from disk to the child task (using vm_region,vm_allocate, vm_protect,
  24. vm_inherit) it kills itself and lets the child continue.
  25.  
  26.  
  27.     This works fine except for when I try to do anything
  28. dealing with the port space. The problem is that after restoring 
  29. the state into the child , I try to perform a port_allocate but
  30. it doesn't work. I pinpointed the error to the fact that
  31. task_self() is returning an invalid port. I have no idea
  32. why. Is there something I should watch out for when 
  33. deallocating the child's memory to give room for the 
  34. new virtual memory?
  35.  
  36.  
  37. There is a paper in the October 1990 Usenix conference called
  38. "Transparent Recovery of Mach Applications" by
  39. Goldberg, Gopal, Li, Strom, and Bacon. This paper discusses
  40. a similar scenario. Does anyone have any information
  41. of what I may be doing wrong? Any help would
  42. be GREATLY appreciated.
  43.  
  44. Alain
  45.  
  46. PS. Could you please send any replies to alain@cs.concordia.ca as
  47. I don't usually get a chance to read news. Thanks again
  48.  
  49.  
  50.  
  51.  
  52.