[openbeos] Re: Kernel/app_server req #768 - suspend/resume

  • From: François Revol <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx, Zenja Solaja <solaja@xxxxxxxxxx>
  • Date: Wed, 03 Apr 2002 00:45:26 +0200 (MEST)

[revol@patrick /boot/home]$ hgrep suspend_thread
/boot/develop/headers/be/kernel/OS.h:extern _IMPEXP_ROOT status_t       
suspend_thread(thread_id thread);
[revol@patrick /boot/home]$ hgrep resume_thread
/boot/develop/headers/be/kernel/OS.h:extern _IMPEXP_ROOT status_t       
resume_thread(thread_id thread);

didn't know your BeOS could do this hmm ? ;)

Anyway it's not to the OS to decide if the user can interrupt a thread/team
it's the team itself which should provide a "pause rendering" button or 
whatever that lets the user control the flow.
And there is Processcontroller :P

<offtopic>
btw XINU is nice, but I never was able to recompile it for my Ti92 :-(
although someone did, but used CodeWarrior (makefile ownz :P) and 
didn't leave enough docs
</offtopic>

En réponse à Zenja Solaja <solaja@xxxxxxxxxx>:

> Here is a suggestion for the Kernel and App_server teams.
> 
> Suggestion:
> Allow the user to Suspend/Resume a process/team.  The Schedular does
> not
> schedule a 'suspended' process.  Once the user sends a 'resume' signal,
> the
> process changes state to 'Ready' which means that the schedular may
> schedule
> the process.
> 
> Methodology:
> a) via command line interface, and commands 'suspend pid' and 'resume
> pid'
> (or team)
> b) via an extra button on every windows title bar (green/yellow
> button).
> Pressing this button sends a 'suspend' signal to the app_server/kernel,
> and
> pressing it again sends a 'resume' signal.
> c) via the deskbar.  Along with the entries 'show all', 'minimise all'
> etc
> insert a mutually exclusive 'suspend/resume'.
> 
> Purpose:
> In the everyday use of the machine, a user may activate two resource
> intensive applications.  An example would be copying a large file from
> one
> drive to another, while at the same time emptying over 1000 files in
> the
> Trash.  We've all experienced hard disk thrashing due to 2 processes
> competing for resources.  With the ability to suspend a task, we can
> eliminate the disk thrashing.  CPU hogging apps can also temporarily
> be
> suspended to allow for a more urgent tasks to be complete.  This allows
> the
> user to have 'complete' control over their PC's.
> 
> Issues:
> Scenario: user suspends task, then decides to quit.  Do we 'resume'
> then
> 'quit'?
> Scenario: user resumes task.  System needs to keep track of thread
> states
> prior to suspension (we dont want to set the state to 'ready' if the
> thread
> was previously 'waiting' or 'suspended'.
> Scenario: user suspends multimedia task.  An audio tone may continue
> playing
> indefinately until the envelope drops.
> 
> Implementation:
> I'm familiar with XINU and its processes can be 'suspended'.  I dont see
> a
> reason why NewOS couldn't do it.  The App_server needs to attach a new
> button to each windows title bar, and direct these messages to the
> kernel.
> OpenDeskbar also needs to add a new menufield.  
> 
> R1 or R2 material?  Do you like it?  Discuss.
> 
> 
> ----------------------
> CONFIDENTIALITY NOTICE
> ----------------------
> This email is intended only to be read or used by the addressee.
> The information contained in this e-mail message may be confidential
> information. If you are not the intended recipient, any use,
> interference
> with, distribution, disclosure or copying of this material is
> unauthorised
> and prohibited. Confidentiality attached to this communication is not
> waived
> or lost by reason of the mistaken delivery to you.
> 
> If you have received this message in error, please delete it and notify
> us
> by return e-mail or telephone Aristocrat Technologies Australia Pty
> Limited
> on +61 2 9413 6300.
> 
> 






Other related posts: