2 ms·
> In fact, the “userspace” task switching GUI would read the kernel’s process table directly to make a list of running programs. This is great. A perfect learn
by dmix 7y ago
> In fact, the “userspace” task switching GUI would read the kernel’s process table directly to make a list of running programs.
This is great. A perfect learning project is trying to build something yourself, then learning how other developers solved the problems or larger OSes handle it (or working backwards from that point and simplifying).
I noticed some "#ifdef FLASH4MB" in the linked source code, was it difficult to update it for 4mb or were similar constraints in place where it was basically the same with more memory?
- ddevault 7y agoNah, it was reasonably easy. The main issue with 4MB calcs is that it used a secondary hardware port to add two extra bits to the page address. Until then we were able to page with only one port, so everywhere was hardcoded to use it. We had to replace all of that with a marcro, and update a few places manually. There's a comment in that code which speaks to this: ; we can't use getBankA because it behaves differently on the 84+CSE, and we don't want that getBankA was the name of the macro we used to interrogate which Flash page was swapped into bank A (address space 0x4000-0x7FFF). The real pain with that port was the new color screen.
- cesarb 7y agoInterestingly, "read the kernel’s process table directly to make a list of running programs" is exactly how the "ps" command worked in the distant past. It's a bit hard to find information about this nowadays, but I could find a couple of SE answers (https://unix.stackexchange.com/a/340893 https://unix.stackexchange.com/a/340893 and https://unix.stackexchange.com/a/511530 https://unix.stackexchange.com/a/511530) which mention this fact.