OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Dec 12, 2018 12:07 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SIGSTOP on UNIX sistems
PostPosted: Thu Apr 26, 2018 8:37 am 
Offline

Joined: Sat Sep 02, 2017 11:34 am
Posts: 7
When you issue a SIGSTOP on UNIX sistems (for example, when you send the CTRL+Z command to put the program on background), the memory used by the process it's still allocated, or saves the map of this memory, to allow other process use memory?
Thank you


Top
 Profile  
 
 Post subject: Re: SIGSTOP on UNIX sistems
PostPosted: Thu Apr 26, 2018 9:11 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

mondelob wrote:
When you issue a SIGSTOP on UNIX sistems (for example, when you send the CTRL+Z command to put the program on background), the memory used by the process it's still allocated, or saves the map of this memory, to allow other process use memory?


SIGSTOP only pauses execution for a little while (until you send SIGCONT to make it continue again). It doesn't make sense to free any memory (and then crash when SIGCONT is sent); but might make sense to consider the process' pages "less likely to be needed soon" for the purposes of figuring out which pages to send to swap space (rather than using pure "least recently used" as the basis of what to send to swap space).


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: SIGSTOP on UNIX sistems
PostPosted: Fri Apr 27, 2018 1:10 am 
Offline

Joined: Sat Sep 02, 2017 11:34 am
Posts: 7
Brendan wrote:
Hi,

mondelob wrote:
When you issue a SIGSTOP on UNIX sistems (for example, when you send the CTRL+Z command to put the program on background), the memory used by the process it's still allocated, or saves the map of this memory, to allow other process use memory?


SIGSTOP only pauses execution for a little while (until you send SIGCONT to make it continue again). It doesn't make sense to free any memory (and then crash when SIGCONT is sent); but might make sense to consider the process' pages "less likely to be needed soon" for the purposes of figuring out which pages to send to swap space (rather than using pure "least recently used" as the basis of what to send to swap space).


Cheers,

Brendan


Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group