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

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 23 Sep 2018 09:00:46 -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 ahwayakchih):

 Replying to [comment:10 cb88]:

Freezing an application and then saving  it's state is something you'd
 have to do for a sane suspend implementation on Haiku.

 Automatic persistence was one of (main?) features of now dead Unununium OS
 and then ich:os (http://ichos.sourceforge.net/) - which also seems dead.

 BeOS/Haiku actually has API for implementing almost that
 ({{{BArchivable}}}, {{{BFlattenable}}}), but it has to be implemented per
 application, which puts heavy burden on developers of every application.

 Simply dumping current memory/registers/whatnot of selected application is
 outside of reach for 3rd party application AFAIK.

Why not add extra functionality to process controller, it's certainly
 rather power user centric anyway already. So instead of just Cancel /
 Debug / Kill you could also have Pause\Unpause or send to remote machine
 etc...

 Yes, additional button is one of the ways to implement this on the
 "system" side (now that ProcessController is part of the "core") and could
 work quite nice.

Haiku boots fast enough that normal susped isn't much use. But freezing
 applications and then saving all thier memory to disk, then rebooting,
 then restoring the applicaition could in fact be useful and has been
 menitoned by Haiku developers recently as a method of supporting suspend.

 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 went down the rabbit hole here a bit but hopefully that fires up
 people's imaginations...

 It's good to have dreams and goals :).

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

Other related posts: