Earlier quoted context omitted.
Yes. The author is, like me, a male trans woman.
Why do you think there are so many of you fellows in this industry, compared to the general population? It's a noticeable skew that has always baffled me.
I'm 17 and wrote this guide on how CPUs run programs
291–300 of 327 posts
Re: I'm 17 and wrote this guide on how CPUs run programs
#292OP, don't excuse your work by prefixing it with your age. Your write-up is better than most people will ever do. Nice work!
Re: I'm 17 and wrote this guide on how CPUs run programs
#293A couple of very minor points:
"The first mass-produced CPU was the Intel 4004, designed in the late 60s by an Italian physicist and engineer named Federico Faggin."
The first microprocessor (CPU on a single chip) was Faggin's Intel 4004, but mass-produced CPUs existed before that. Earlier CPUs were built from multiple chips, and before that multiple individual transistors, and before that multiple vacuum tubes, and before that multiple relays (although it's fair to say that relay computers were never mass-produced).
"The CPU stores an instruction pointer which points to the location in RAM where it’s going to fetch the next instruction."
This is also called the Program Counter or PC outside the Intel universe. This is confusing as "PC" also stands for "Personal Computer" but people who learned computing in the days before Intel became popular still call it the PC register.
Re: I'm 17 and wrote this guide on how CPUs run programs
#294When I was 11 I coded in assembly and machine language, what do I win?
Re: I'm 17 and wrote this guide on how CPUs run programs
#295Hi! I'm Lexi, I wrote this article/mini-book. There's a classic question of "what happens when you load a website?", but I've always been more interested in "what happens when you run a program?". About 3 months ago, I was really annoyed at myself for not knowing how to answer that question so I decided to teach myself. I taught myself everything else I know in programming, so this should be easy, right? NOPE! Appare…
Having read the first couple of pages, my only feedback is a strong suggestion to drop the cutesy language. >The central processing unit (CPU) of a computer is in charge of all computation. It’s the big cheese. The shazam alakablam. It starts chugging as soon as you start your computer, executing instruction after instruction after instruction. Given the context, that would read much better as: >The central processin…
Re: I'm 17 and wrote this guide on how CPUs run programs
#296Congrats on completing this guide. > There aren't many comprehensive systems resources if you aren't going to college, so I had to sift through tons of different sources of varying quality and sometimes conflicting information. The absolutely best resource you will find is Charles Petzold's Code: The Hidden Language of Computer Hardware and Software . The 2nd edition was just released. https://codehiddenlanguage.com/
It does a fantastic job taking you from nand gates all the way to function calls but in a delightfully interactive way. Instead of just imagining how it all must work in ur head as u read, u get to build it.
I went so far as to build a little simd/gpu that drives an led matrix with my own cpu assembly and programmable shader language.
Re: I'm 17 and wrote this guide on how CPUs run programs
#297Earlier quoted context omitted.
> However, the details of modern branch predictors are proprietary, so we don’t have authoritative sources on them. I focused on Computer Architecture for a masters degree and now I work on a CPU design team. While I cannot say what we use due to NDA, I will say that it is not proprietary. Very nearly everything, including the branch predictors, in modern CPUs can be found in academic research. Many of these secrets…
I’m not related to academia. I don’t design CPUs. I don’t write operating systems and I don’t care about these side channel attacks. I simply write user-mode software, and I want my code to be fast. The academic research used or written by CPU designers being public doesn’t help me, because I only care about the implementation details of modern CPUs like Intel Skylake and newer, AMD Zen 2 and newer. These details hav…
Practically, the only thing that matters is that branch prediction assumes that history repeats itself, and that past patterns of a branch being taken in certain conditions will impact it being taken again.
So that means that conditions that are deterministic and relatively constant throughout the lifetime of the program will most likely be predicted correctly, and that rare events will most likely not be predicted correctly. That's all you need to know to write reasonably optimized code.
Re: I'm 17 and wrote this guide on how CPUs run programs
#298Re: I'm 17 and wrote this guide on how CPUs run programs
#299Re: I'm 17 and wrote this guide on how CPUs run programs
#300Earlier quoted context omitted.
Facts. What I wonder is if everyone else wants to believe or really just doesn't care. For some reason, I really hate being lied to.
It honestly isn’t important, so I can see why people don’t care. But it is interesting, at least to me. :)