Fashion Updated 2025-07-16
Mathematics Genealogy Project Updated 2025-07-16
x86 bare metal examples Updated 2025-07-16
As mentioned at Section "Linux Kernel Module Cheat", this should be merged into that other project.
x86 Paging Tutorial Single level paging scheme numerical translation example Updated 2025-07-16
Suppose that the OS has setup the following page tables for process 1:and for process 2:
entry index entry address page address present
----------- ------------------ ------------ -------
0 CR3_1 + 0 * 4 0x00001 1
1 CR3_1 + 1 * 4 0x00000 1
2 CR3_1 + 2 * 4 0x00003 1
3 CR3_1 + 3 * 4 0
...
2^20-1 CR3_1 + 2^20-1 * 4 0x00005 1entry index entry address page address present
----------- ----------------- ------------ -------
0 CR3_2 + 0 * 4 0x0000A 1
1 CR3_2 + 1 * 4 0x12345 1
2 CR3_2 + 2 * 4 0
3 CR3_2 + 3 * 4 0x00003 1
...
2^20-1 CR3_2 + 2^20-1 * 4 0xFFFFF 1When process 1 tries to access a linear address, this is the physical addresses that will be actually accessed:
linear physical
--------- ---------
00000 001 00001 001
00000 002 00001 002
00000 003 00001 003
00000 FFF 00001 FFF
00001 000 00000 000
00001 001 00000 001
00001 FFF 00000 FFF
00002 000 00003 000
FFFFF 000 00005 000To switch to process 2, the OS simply sets
cr3 to CR3_2, and now the following translations would happen:linear physical
--------- ---------
00000 002 0000A 002
00000 003 0000A 003
00000 FFF 0000A FFF
00001 000 12345 000
00001 001 12345 001
00001 FFF 12345 FFF
00004 000 00003 000
FFFFF 000 FFFFF 000Step-by-step translation for process 1 of logical address
0x00000001 to physical address 0x00001001:- split the linear address into two parts:
| page (20 bits) | offset (12 bits) | - look into Page table 1 because
cr3points to it. - The hardware knows that this entry is located at RAM address
CR3 + 0x00000 * 4 = CR3:
*0x00000because the page part of the logical address is0x00000
*4because that is the fixed size in bytes of every page table entry - since it is present, the access is valid
- by the page table, the location of page number
0x00000is at0x00001 * 4K = 0x00001000. - to find the final physical address we just need to add the offset:
00001 000 + 00000 001 --------- 00001 001because00001is the physical address of the page looked up on the table and001is the offset.The offset is always simply added the physical address of the page. - the hardware then gets the memory at that physical location and puts it in a register.
Another example: for logical address
0x00001001:- the page part is
00001, and the offset part is001 - the hardware knows that its page table entry is located at RAM address:
CR3 + 1 * 4(1because of the page part), and that is where it will look for it - it finds the page address
0x00000there - so the final address is
0x00000 * 4k + 0x001 = 0x00000001
Ciro Santilli's documentation superpowers Updated 2025-07-16
Ciro Santilli has the power to document stuff in a way that makes using them awesome, as evidenced by his his Stack Overflow contributions (notably those in the best articles by Ciro Articles), and other online contributions.
If your project does something awesome, hiring Ciro means that more people will be able to notice that it is actually awesome, and use it.
He likes to do this in parallel to contributing new features, quickly switching between his "developer" and "technical documentor" hats.
This means of course that he will develop new features a bit slower than others, but he feel it is more valuable if end users can actually use your project in the first place.
His technique is to provide upfront extremely interactive and reproducible getting started setups that immediately show the key value of the project to users.
He backs those setups with:A prime example of kind of setup is Ciro's Linux Kernel Module Cheat.
- scripts that automate the setup much as possible to make things enjoyable and reproducible
- a detailed description of the environment in which he tested: which OS, version of key software, etc.
- a detailed description of what is expected to happen when you take an action, including known bugs with links to bug reports
- theory and rationale on the sections after the initial getting started, but always finely interspersed with concrete examples
- all docs contained in a Git-tracked repo, with the ability to render to a single HTML with one TOC
- short sentences and paragraphs, interspersed with many headers, lists and code blocks
While he create this setup, he inevitably start to notice and fix:
- bugs
- annoyances on the public interface of the project
- the devs were using 50 different local scripts to do similar things, all of them semi-broken and limited. Every new hire was copying one of those local scripts, and hacking it up further.
- your crappy build / test / version control setup
Exploiting this skill, however, requires you to trust him.
When he tells to managers that he's good at documenting, they always say: great, we need better documentation! But then, one of the following may happen:
- managers forget that they wanted good documentation and just tell him to code new features as fast as possible
- they don't let him own the getting started page, but rather and expect him to try and fix the existing crappy unfixable existing getting started, without stepping on anyone's pride in the process >:-)Good documentation requires a large number of small iterative reviews, and detailed review of every line is not always feasible.Too many cooks.
Ciro's passion for documentation and tooling has the effect that if you have crappy documentation and tooling and don't want them to be fixed, Ciro will end up trying to fix those tools instead of doing what you tell him to do anyways, which might lead to him quitting because he can't stand the tools, or you firing him because he's not doing the job you think I should be doing. So please, don't bother hiring Ciro if you have crappy documentation and tooling.
Psychological analysis of why Ciro has this gift: How Ciro Santilli manages to write so much.
Ciro often has the following metaphor in his mind:
New discoveries are like very rough trails where you have to cut through heavy bushes (an original research paper).After a brave explorer goes through this rough path for the first time and charts it, it does become much easier for others to follow it later on, but it still requires a lot of effort to go through them, because there are still a lot of rough bushes and some parts of the map are not very clear (reading and reproducing the research paper to further advance the state of the art).As enough people start going through, the probability that someone with a bad memory ends up walking it increases, and that person ends up pounding the earth into a beaten track and increasing the trail clearance of the beginning of the trail at least (review paper).There finally comes a point when even the local government starts to notice this trail is important, and pays someone to add some stone pavement and rails on the most exposed parts of the trail (post and undergrad education).And at last, Ciro Santilli comes with a bulldozer and creates an autoroute that thousands of people can cruise at high speed without any effort (Q&A, open knowledge HTML websites).
Ciro's documenation obsession is partly part of his braindumping effort of dumping his brain into text form, which he has been doing through Ciro Santilli's website.
Ciro Santilli's hardware Vacuum cleaner Updated 2025-07-16
OurBigBook Updated 2025-07-16
Strava Updated 2025-07-16
Astrophysics Updated 2025-07-16
Sound synthesis Updated 2025-07-16
Technique to make cool sound instruments mathematically, either with electronic hardware components, or with a software synthesizer.
Good tutorials:
Best known techniques:
Title track Updated 2025-07-16
Mathematics YouTube channel Updated 2025-07-16
Musical instrument Updated 2025-07-16
Music education Updated 2025-07-16
Register (sociolinguistics) Updated 2025-07-16
Serious game Updated 2025-07-16
Video game Updated 2025-07-16
Ciro Santilli used to play video games when he was young. But after he reached 18 he got bored of them.
The problem is that no matter how you look at, the how to become famous in the real world game is just always more interesting and fulfilling.
Therefore adult Ciro enjoys only the following types of video game content in video form, so that other people waste their lives playing the games while you only see the highlights:
- speedrunning, including:
- tool-assisted speedrun, Ciro's favorite by far
- real-time attack speedrun
- meta breaking glitches, including in speedrunning and on PvP-games.
- Magic: The Gathering
- Video game reviews
The aspect Ciro enjoys about non-PvP games is atmosphere. Not as conveyed by useless story telling, but as conveyed by music and graphics, and the context deep idea. Legend of Zelda and Metroid come to mind.
And too many games commit the sins of dependency of dexterity, no save states, how do I skip this boring part, or jump straight to the beautiful one?
Another important point is; the perfect video game is an infinitely hard one.
It also doesn't help if you are already typing on a computer all day long on your job. Hands get tired. Eyes have an infinite capacity to consume useless YouTube videos however. Medically proved.
As a result, Ciro just watches videos about video games. Notably games he played when he was a teenager and already understand the rules for.
And things got even worse as after Ciro Santilli's Open Source Enlightenment, and he started to feel bad about playing any game that is not open source.
Supercut of Doug S02E13 "Doug's Lost Weekend" (1992)
Source. Ciro Santilli used to watch Doug as kid. Of all the episodes, only this one stuck to his mind as an adult. It really drove the point home. The pain and joy of being addicted to anything really. Thankfully wheneve Ciro got addicted to a video game, he also quickly got tired of it. His last temporary addiction episode as of 2022 was Cataclysm DDA!
It is also so awesome how the episode pictures Dougs imagination while playing the video game, which is much more realistic than the actual crude graphics. The Nintendo hard reference is also clear.
Another great point of the episode is how good it is to play a single player video game taking turns with a friend on your side. Both people have to be fully engaged, and the game has to be hard. Perhaps those days are over now that everyone has their own computer and can each play together... and that is a huge shame. When playing on the couch with a friend, the one who is not playing can act as a copilot and thing more broadly as the other focuses on more specific details of execution. One is also reminded of pair programming.
Another great point is, partially when you are addicted, to play the video game at night until late, or very early in the morning. Ciro has fantastic memories of playing Zelda on the Nintendo 64 on Sunday mornings, or his emulation experiences from late weekend evenings at university: Video "Samba e Amor by Caetano Veloso (1975)".
The followup lucky hat segment is also amazing: doug.fandom.com/wiki/Doug%27s_Lucky_Hat
Chocolate Updated 2025-07-16
Etymology Updated 2025-07-16
Figure of speech Updated 2025-07-16
There are unlisted articles, also show them or only show them.
