[haiku-bugs] Re: [Haiku] #14507: Implement a way to pause programs

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 23 Sep 2018 10:26:52 -0000

#14507: Implement a way to pause programs
------------------------------------+----------------------------
   Reporter:  miqlas                |      Owner:  nobody
       Type:  bug                   |     Status:  new
   Priority:  normal                |  Milestone:  Unscheduled
  Component:  Kits/Application Kit  |    Version:  R1/Development
 Resolution:                        |   Keywords:
 Blocked By:                        |   Blocking:
Has a Patch:  0                     |   Platform:  All
------------------------------------+----------------------------

Comment (by tangobravo):

Not sure if just dumping memory would do. I mean, if every application
 has its own address space, so pointers would not have to be "translated",
 and does not onnect to anything "outside" then maybe? Still, things like
 {{{port_id}}}, {{{area_id}}}, {{{thread_id}}}, {{{sem_id}}}... all would
 become either invalid or pointing to a very different target, so there
 would have to be some way to "reconnect" them, or an API for application
 to do that... which points us again to {{{BArchivable}}} API, etc...

Linux does something similar these days where You can even transfer
 instances of applcations between different computers or VMs. LinuxPMI
 comes to mind but I'm not sure if that was what I was intending to
 remember.

I wonder how they reconstruct connections to "global" (system-wide)
 resources. Simply dumping and then reading into RAM may be not enough.


 I guess you'd need some kind of translation layer to "virtualize" all of
 those resources. Obviously you can suspend the entire state of a VM, move
 the files somewhere else, and resume where you left off. If each app is
 effectively running in a VM then the same thing could happen. This is
 potentially how docker containers work on Linux, but I've never looked
 into the details there. They have significantly less overhead than using
 lots of VMs, but generally see a pretty isolated view of the system thanks
 to the kernel I believe, so might be possible to implement storing and
 restoring state without needing special code on the app side.

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14507#comment:13>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: