Hacker News
points by pjscott 8 hours ago | 0 comments
> always-running daemon

This is completely tangential to your point, but I'd bet that this daemon isn't always running. Apple is fond of putting as much system functionality as possible into daemons that (a) can be spun up quickly when needed in response to Mach IPC messages, (b) can be killed safely at any time to free up memory, including with SIGKILL if necessary, and most importantly (c) operate in the tightest, most locked-down sandbox they could devise.

For background computational tasks like this one, it can also be helpful for getting thread prioritization right. If some computation doesn't need to happen quickly, a daemon can easily make sure that it gets assigned to efficiency-optimized CPU cores, tell the OS scheduler to give priority to more important stuff, reduce precision of timers to coalesce wakeups, and make sure that any thermal throttling affects the background stuff before it slows down anything the user will notice. It's a pretty slick system.

Aún no hay comentarios.
Hacker News