Earlier quoted context omitted.
writing programs for old game consoles, Oh yeah, like the Intellivision. particularly the Nintendo DS. Oh come on, the DS ain't that old.
20 years next year.
What happens when a CPU starts
41–50 of 133 posts
Re: What happens when a CPU starts
#42Among other things, since it uses magnetic core memory, you can run the program that was loaded when you shut it off.
Re: What happens when a CPU starts
#43This is only partially true. When digital chips boot up, gate outputs are in an indeterminate state. The reset sets them to know initial (and valid) values/bits.
Re: What happens when a CPU starts
#44Earlier quoted context omitted.
> But they run no OS, your program runs directly on the hardware How is threading/time scheduling/interrupt handling/context switching usually done?
I dunno about the DS, which doesn't really qualify as that old to me; it's got a pretty decent sized rom for when you don't have a cartridge in, and I'd guess the SDK gives you something approaching an OS, maybe even with a threading library. But on real old hardware, you're not going to run threads or a scheduler, you're going to run one iteration of your game loop, then wait for a sign that it's time to do your gra…
Would you agree with this statement from ChatGPT? Is the Windows kernel handling thousands of context switches and time slicing processes the way you described? pushad/pushfd + popad/popfd
Re: What happens when a CPU starts
#45Earlier quoted context omitted.
Yeah modern hardware is crazy hard to understand and a lot is proprietary/trademark stuff like you saw on the rpi. Arduino is a good start but it's just so low level that it doesn't get you much further to understanding how a modern system works. One slightly weird but fascinating path I have been playing with is writing programs for old game consoles, particularly the Nintendo DS. You can get full and comprehensive…
writing programs for old game consoles, Oh yeah, like the Intellivision. particularly the Nintendo DS. Oh come on, the DS ain't that old.
Re: What happens when a CPU starts
#46Earlier quoted context omitted.
20 years next year.
I haven't even reached 30, yet that comment of yours made me feel old.
Re: What happens when a CPU starts
#47Amongst the first sentences... > It may be thought of as what happens when a whole computer starts, since the CPU is the center of the computer and the place where the action begins. I thought that too. Last year I spent a while getting as low-level as I could and trying to understand how to write a boot loader, a kernel, learn about clocks and pins and interrupts, etc. I thought, "I know, I'll get a Raspberry Pi! Th…
Re: What happens when a CPU starts
#48Earlier quoted context omitted.
I dunno about the DS, which doesn't really qualify as that old to me; it's got a pretty decent sized rom for when you don't have a cartridge in, and I'd guess the SDK gives you something approaching an OS, maybe even with a threading library. But on real old hardware, you're not going to run threads or a scheduler, you're going to run one iteration of your game loop, then wait for a sign that it's time to do your gra…
> In a typical Windows 10 installation with many background processes and services, the CPU context switching rate can vary greatly depending on the specific system's hardware configuration, running processes, and workload. However, on a typical system, the context switching rate can be anywhere from a few hundred to a few thousand times per second. Would you agree with this statement from ChatGPT? Is the Windows ker…
If you're good at Windows, you can probably get a count of context switches per second on your system, with your load. Context switches generally includes interrupts as well as calls into the kernel from userspace. A server work load is going to go up to hundreds of thousands, maybe millions per second, again depending on your load.
Re: What happens when a CPU starts
#49"It starts at 0 and executes instructions" is a funny, but mostly true way to express this. Some people are shocked that no magic happens before the instructions start.
Re: What happens when a CPU starts
#50Amongst the first sentences... > It may be thought of as what happens when a whole computer starts, since the CPU is the center of the computer and the place where the action begins. I thought that too. Last year I spent a while getting as low-level as I could and trying to understand how to write a boot loader, a kernel, learn about clocks and pins and interrupts, etc. I thought, "I know, I'll get a Raspberry Pi! Th…