[HN Gopher] Processes and Threads
___________________________________________________________________
Processes and Threads
Author : ksec
Score : 18 points
Date : 2025-09-24 16:09 UTC (6 hours ago)
(HTM) web link (planetscale.com)
(TXT) w3m dump (planetscale.com)
| samlambert wrote:
| Another Ben Dicken classic
| tanelpoder wrote:
| Yeah looks like this will be a common theme :-)
| bddicken wrote:
| Author of the article here. Hope you love it, and I'm hanging
| around to answer any questions.
| itunpredictable wrote:
| awesome work, really enjoyed this
| bddicken wrote:
| Thank you!
| Veserv wrote:
| A fine introduction, but a few nits.
|
| Similar to how in the "POSIX threads" section you indicate that
| pthread_create() is UNIX/POSIX-specific, you should probably
| indicate in the "Creating new Processes" section that fork()
| and execve() are Unix/POSIX-specific. That, or you could
| indicate that you are describing generally in that context.
|
| In "Running multiple programs" you state: "After a few seconds,
| it pauses, saves the state of the RAM, and changes processes."
| Saying it "saves the state of the RAM" is probably not a good
| characterization since it is more likely just changing what
| memory is accessible. It is also, most likely changing the
| virtual memory mappings to give the illusion of using the same
| memory addresses (though it does not have to, for instance a
| system with a MPU still has a concept of distinct programs even
| though virtual memory mappings are not supported), but you
| could omit that to the later virtual memory section without
| being incorrect.
| bddicken wrote:
| Thanks for the feedback!
|
| Yeah, I purposefully "simplified" how virtual memory works
| here so that the focus could be on multitasking and context
| switching, but agree that isn't totally accurate. I actually
| had hoped to do a part II on virtual memory, but we'll see if
| time permits that :)
___________________________________________________________________
(page generated 2025-09-24 23:02 UTC)