You most probably do not want to avoid macOS from suspending apps when the system runs out of RAM when you know that the only alternative is to kill the program. I.e. stop the program from running now and here without saving its data or anything like that.
However, you do not have to restart the programs that are paused as in "close the program and start it over". Instead you can actually unpause the program when you have sufficient free memory on the system. You can do this from the terminal by running:
kill -CONT <pid>
where should be replaced with the process ID of the process, you want to unpause.
You can find process ID using Activity Monitor or the "ps" command in the Terminal (in this case, look for processes with status T as these are the paused/stopped ones).
An easy way of unpausing and finding the ID in one go is:
kill -CONT `pgrep myprogram`
where myprogram is the name of the program you want to unpause.
The second part of your question where you describe the ideal scenario is very hard to accomplish with a standard program. In general programs can request memory from the operating system, but the operating system cannot request it back afterwards. It is possible, but it requires very specialized programs which is generally not the case.
This means that once macOS have granted your program for example 1 GB of RAM, the operating system cannot just take it back when other programs want more memory. If you take away memory from programs that are not specially crafted to allow that, they will effectively crash as soon as they attempt to use the lost memory.
This is the type of UX pain that really irks me, and very unlike Apple.
Since you're a long time Mac user I'm going to assume you have access to another Mac, so my suggestion would be to try reinstalling a fresh version of macOS Sierra via a USB installer.
Follow the steps below:
- On another Mac, download the macOS Sierra installer via the Mac App Store
- After its downloaded, the installer will launch automatically. When it does, quit the installer.
- Grab a USB flash drive of at least 8GB in size
- Connect the USB flash drive to the same Mac
- Rename the flash drive to Untitled
- Launch the Terminal app
Now enter the following command into Terminal. It may be best to just copy it from here (try triple-clicking) and paste it in.
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app
You will be prompted to enter your user password. Enter it now and press return (note that you won’t see the cursor move or display any of the characters you enter)
- At the next prompt (about erasing your drive) press the Y key
- Wait for your USB flash drive to be erased (you’ll see the progress via % values appearing within the Terminal window)
- Once the erasure is complete, you will see a prompt that files are being copied to the disk. This may take a while, so be patient.
- Eventually the copy process will be over and you should see a Done message in Terminal. You can now quit Terminal.
- Eject the USB flash drive and now connect it to your iMac (the one you want to reinstall macOS Sierra on)
- Startup the iMac holding down the option key
- Select the USB flash drive you created from the list of drives and press enter
You should now be able to boot from the USB drive and install macOS Sierra from there.
Let me know if you have any questions.
Best Answer
When removing "parts of the operating system" any update you get through the software update mechanism (AppStore) will re-install these apps and processes. Well, at least partially. Even so called ComboUpdaters were in fact delta updates relying on some previously installed base for many of the components supposedly contained in the ComboUpdater in full.
This results in a problem for those wishing to customise their installation: after removing parts Apple assumes are present some parts will only look like they are fully re-installed when in fact they are now 'present' but broken. This is what was experienced in the question when supposedly re-installed apps are now greyed out.
That leaves the customiser a couple of options:
Download the standalone updaters from Apple, while that's still possible. This is the usage/how-to request in the question. But it is a tough choice: In case of the macOS High Sierra 10.13.1 update that would be here. You might then use a manual installation of individual parts of the updater package(s). This might be done with a programme like Pacifist. But this process is very time consuming, and error prone, at least. If there are firmware updates or some undocumented non-obvious scripts to be applied in this update this procedure reaches quickly its limits and it might even be almost impossible to replicate what the updater did. Errors will very likely accumulate along the way.
Re-delete or re-disable everything you previously disabled (that means you should prepare at least a script for that). This is clearly the best option if you start updating from a non-Apple approved state of system manipulation. If Chess and iCloud were useless before they are useless now, in their (half or cmpleely) broken state. Note that this answer does not discuss any SIP related issues, since that has be a non issue in the scenario given anyway. This adds just one additional step of after update maintenance.