CPU and RAM wise PS4, not having to worry about snap like features, can assume the game is either backgrounded or full screen using the full system resources minus a known set of system services (notifications, custom background music, PS Store downloads and uploads, etc...) some of which are backed by a secondary CPU with its own private memory pool (background video recording, streaming, etc...). Although it is a quick transition when you go for example to be share screen, the game is paused and control given to the OS including the bulk of system resources, CPU cores included.
Essentially, the OS has likely at least two modes of operation, shrinking when the game is full screen and only game companion services so to speak are needed (streaming a game and keeping the chat comments coming and the watchers notification, etc...), and reclaiming resources whenever brought in full control again. The system is never running complex and resource hogging operations when the game is active and viceversa.