On 2021-11-24 18:26, Michael Hamilton wrote:
I don't think I'm confusing any of these. I was relating that, in my experience with UNIX, there were long run process that were worth keeping track of. Some jobs did break down into lots of process, but some jobs also ran single processes for minutes, hours or days.
Well, let see. We're talking about UNIX as of 1970s/1980s. We're not talking BSD or late UNIX after it was taken out of Richie's hands and run USG. My shell lasted a long time, I logged in then never logged out for days, perhaps weeks. Yes, there were some "permanent" processes: the processes that watched for something. I'd say the things that watched the serial ports for logins or UUCICO connections. Or maybe not. The login watcher that opened all the tty ports and waited wasn't there in V7, it came from BSD as a side effect of the non-blocking 'open'. The way V5,6,7 (yes I worked on those) did that was to have 'login' spawn children for each port. The children each opened a port and back then that meant it was blocking. That child 'died' when the user logged out and the parent was signalled, did some clean-up, and spawned a new child. But that long-lived parent was thin and almost inactive. IIR there were a few other 'thin/watchers' like that. I recall there was one of those that was used for print managing. But there were a number of different implementations and policies for printing even in V7. UNIX V7 was also of the era where Bell was licencing it out and a number of microprocessor firms tried putting it on their chips. At the end of the 1970s and into the 1980s we say many 16-bit processors: Intel, Zilog, Motorola, as well a Texas Instruments (bit slice), AMD (bit slice ), Ferranti, General Instruments, Honeywell... Then there were the more mainstream 16 bit minicomputers but they weren't something to consider here. Microsoft bought a UNIX v7 source licence and never used it, but subcontracted it to other firms. Since some universities had already 'seen' and done some work, people there set up companies and used this to commercialise UNIX. That resulted in in one here in Toronto. They in due course, hired Richard Miller who had ported V6 to the Interdata 7/32 at Wollongong University, and myself who had worked on V5, battling the compiler, at Canterbury University and had reverse-compiled the product of a port of V7 to run on a Zilog Z-8000. If you know of something on V5,6,7 other than the thin examples I give or something that's long lived 'cos the user never logged out please explain it. ======================= Now when it comes to modern Linux, there's a lot of 'noise'. For example, when I run 'iftop' I want the sites resolved. That means I'm making dnsmasq do a lot of work and that takes network, cpu and memory. So I set up the filters to not show that. Heck, process zero is noise, but its there as a button Heck, there the note that 'chrome' is presenting a heavy demand. Which doesn't matter. You are visiting a site that has a complex image and you don't have a fast GPU card so you CPU is having to carry the load of rendering graphics. Sorry, that the cost of the modern Web sites. There's an emergent property of that; the processing of the rendering ends up ding a fair bit of paging. You can see that adding up with 'htop' or with 'vmstat -SM -a 15' OUCH. That was a killer with Leap15.1 and the kernels poor handling of swap. Even 15.2 you still might need to tune swappiness. See https://unix.stackexchange.com/questions/88693/why-is-swappiness-set-to-60-b... If you study the VM system in more detail you can figure out how to purge more of the long-idle processes or longer unused pages. Oh, just as a throwaway: the way Linux does virtual memory is different from how DEC/VAX VMS and how DEC/VAX BSD-UNIX did virtual memory and different fro the ways IBM has done virtual memory. What do I mention this? There's the old line "Virtual Memory means Virtual Performance". That's why 'htop' is useful: virtual, resident, shared memory and priority of any process. Oh, wait, have you read the man page of 'htop'? You can zoom in and tune what you view and what you control https://codeahoy.com/compare/top-vs-htop -- “Reality is so complex, we must move away from dogma, whether it’s conspiracy theories or free-market,” -- James Glattfelder. http://jth.ch/jbg