Page 1 of 1

SIGSTOP on UNIX sistems

Posted: Thu Apr 26, 2018 8:37 am
by mondelob
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

Re: SIGSTOP on UNIX sistems

Posted: Thu Apr 26, 2018 9:11 am
by Brendan
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

Re: SIGSTOP on UNIX sistems

Posted: Fri Apr 27, 2018 1:10 am
by mondelob
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!