G

Gustavo Duarte

duartes.org · Personal blog · on HN since 2008

Gustavo Duarte writes illustrated explanations of how computers, operating system kernels, and memory work.

What HN saysCommenters call his posts great and awesome, recommending his writing on kernel memory management, CPU rings, and what a computer does while you wait.
87HN people shared it
28linked it in comments
81stories submitted
2.5Kstory points
5 years agolast shared
2008people per year2026

Most-shared posts

  1. 1
    Anatomy of a Program in Memory
    10 people · 434 points · first shared 2009 · 23 comments on HN
  2. 2
    What your computer does while you wait
    10 people · 53 points · first shared 2008 · 4 comments on HN
  3. 3
    How The Kernel Manages Your Memory
    9 people · 219 points · first shared 2009 · 18 comments on HN
  4. 4
    How a computer boots up
    7 people · 273 points · first shared 2008 · 39 comments on HN
  5. 5
    First Recorded Usage of "Hacker" (2008)
    7 people · 93 points · first shared 2008 · 12 comments on HN
  6. 6
    Lucky to be a Programmer
    6 people · 74 points · first shared 2008 · 13 comments on HN
  7. 7
    Page Cache, the Affair Between Memory and Files
    6 people · 35 points · first shared 2009 · 1 comments on HN
  8. 8
    The Kernel Boot Process
    5 people · 32 points · first shared 2008 · discussion on HN
  9. 9
    Best of Gustavo Duarte
    5 people · 3 points · first shared 2011 · discussion on HN
  10. 10
    Of Aviation Crashes and Software Bugs (2008)
    4 people · 36 points · first shared 2008 · 15 comments on HN
  11. 11
    What Does an Idle CPU Do?
    2 people · 565 points · first shared 2014 · 55 comments on HN
  12. 12
    Cache Organization in Intel CPUs (2009)
    2 people · 95 points · first shared 2009 · 19 comments on HN
  13. 13
    Feynman, Challenger Disaster, and Software Engineering
    2 people · 67 points · first shared 2009 · 7 comments on HN
  14. 14
    System Calls Make the World Go Round
    2 people · 10 points · first shared 2014 · discussion on HN
  15. 15
    Grokbit – Code search and browsing tool
    2 people · 9 points · first shared 2016 · 1 comments on HN

What HN people wrote when they linked it

carussell · 2017-11-30
Gustavo Duartes has a really great blog[1] about kernels and low-level development, with Linux on x86/amd64 being the reference. Here[2] is the one where he goes into CPU rings and kernel- versus user-mode. 1. http://duartes.org/gustavo/blog/archives/ 2. http://duartes.org/gustavo/blog/post/cpu-rings-privilege-and-protectio…
falava · 2017-02-17
There is a book writen by Paul Graham, creator of HN: Hackers and Painters[1] And there is one tradition to call a hacker to someone who hacks(with software and hardware)[2], doing clever and/or ugly things, and that is not exactly to be a programmer (and also not exactly a security breaker, the other tradition for the hacker name[3]) I think that following the first tradition, the name of the site is well deserved. [1] http://www.paulgraham.com/hackpaint.html [2] https://www.merriam-webster.com/dictionary/hack [3] http://duartes.org/gustavo/blog/post/first-recorded-usage-of-hacker/
AceJohnny2 · 2014-10-29
Gustavo Duarte's (not to be confused with Androider Matias Duarte) blog posts are awesome. I still highly recommend his 2009 in-depth review of how the Linux kernel manages memory: http://duartes.org/gustavo/blog/post/how-the-kernel-manages-your-memor…
paulannesley · 2014-01-20
Just one of thirteen articles in the “Software Illustrated series” on the authors "Best Of" page. http://duartes.org/gustavo/blog/best-of The remaining twelve are on my reading list now.
sciurus · 2012-05-31
One of my favorite writeups on this topic is Gustavo Duarte's "What Your Computer Does While You Wait" http://duartes.org/gustavo/blog/post/what-your-computer-does-while-you…
gruseom · 2012-02-03
That's not true. I'm all in favour of our beloved eponymous usage, but the earliest known occurrence of "hacker" did have to do with breaking into forbidden systems. http://duartes.org/gustavo/blog/post/first-recorded-usage-of-hacker
gns24 · 2011-09-25
I've found the set of short articles on memory here to be excellent: http://duartes.org/gustavo/blog/post/page-cache-the-affair-between-mem…
iuguy · 2011-03-17
This is probably one of the best descriptions of Linux memory management I've ever seen: http://duartes.org/gustavo/blog/post/how-the-kernel-manages-your-memor… Great find!
jedsmith · 2011-03-16
All great reads: http://duartes.org/gustavo/blog/best-of I've never heard of this guy, but I like him already. Anybody that can produce documentation of this level of quality for a relatively advanced codebase is a good person to have committing, or even just hanging around.
samstokes · 2009-11-22
Gustavo Duarte's blog posts are excellent. Clear, readable and detailed explanations of things like what actually happens when booting up and how memory management works. He links to relevant parts of the Linux source code for added context, but also covers how other OSes differ from Linux, and covers how OS design and CPU architecture work together. http://duartes.org/gustavo/blog/ http://duartes.org/gustavo/blog/post/kernel-boot-process http://duartes.org/gustavo/blog/post/how-the-kernel-manages-your-memor…
phyllostachys · 2017-09-13
After a little investigation[1][2], it seems things get weird with an OS, as would be expected with virtual memory, et al. [1] - https://stackoverflow.com/questions/16360620/find-out-whether-a-pointe… [2] - http://duartes.org/gustavo/blog/post/anatomy-of-a-program-in-memory/
flgr · 2015-05-08
Or phrased with a bit more seasoning: "Reading from L1 cache is like grabbing a piece of paper from your desk (3 seconds), L2 cache is picking up a book from a nearby shelf (14 seconds), main system memory is taking a 4-minute walk down the hall to buy a Twix bar, and waiting for a hard drive seek is like leaving the building to roam the earth for one year and three months." — Gustavo Duarte (http://duartes.org/gustavo/blog/post/what-your-computer-does-while-you…
mvklingeren · 2014-11-26
Yes ok, so learning is your main goal :) thats perfectly fine. (some nice info, for the bigger picture in that case http://duartes.org/gustavo/blog/post/how-computers-boot-up/ )
giis · 2014-01-19
Gustavo Duarte : Lucky to be a Programmer http://duartes.org/gustavo/blog/post/lucky-to-be-a-programmer
sounds · 2012-04-11
Nice article/blog post from 2008. If you want to keep reading, the next article is http://duartes.org/gustavo/blog/post/kernel-boot-process
xtacy · 2011-03-17
The illustrations look really nice! He says he uses Visio 2007: http://duartes.org/gustavo/blog/post/quick-note-on-diagrams-and-the-bl…
tom_b · 2010-11-10
You know, you're right. Probably a sign of spending more time on HN and peeking around my local community of devs that reflection of a larger trend. A quick look around found that Java, C++, C#, javascript, and perl (?) are big in job listing at Dice.com right now. http://duartes.org/gustavo/blog/post/programming-language-jobs-and-tre… And the always friendly tiobe index at http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html is useful when thinking about current programming language trends.
klochner · 2010-07-13
Does every programmer really need to know the physics behind dynamic ram? What every programmer should know is the latency of the various memory types (cache, RAM, virtual) and their respective sizes. Here's a nice graphic: http://duartes.org/gustavo/blog/post/what-your-computer-does-while-you…
buster · 2009-11-06
Listing very old sites which may have still some perl fragments somewhere in there infrastructure doesn't mean perl isn't dead. I don't know of any major sites written in perl today. Also, i thought slashdot used perl a long time ago but have already written an new system, but i may remember that wrong... http://duartes.org/gustavo/blog/post/programming-language-jobs-and-tre… has some interesting trends. From what i see there, i'd say perl is probably still alive but slowly dying. My hopes have been on parrot for perl. But after reading about the new perl version and its ridiculous new "features", i am convinced that perl will die when parrot breaks module compatibility with cpan, because noone will port modules, yet care for the new perl.
kazuya · 2009-07-14
In case you are too lazy to enter the URL at the top: http://duartes.org/gustavo/blog/post/what-your-computer-does-while-you… There you can find more nice figures.
nkurz · 2009-02-27
I went back and forth on whether use read() or fread() in my example, and I wasn't sure which to choose. For the purpose of this example, I don't think there is a functional difference between them. In current Linux, I'm pretty sure both of them use the same underlying page cache. fread() adds a small amount of management overhead, but read() does just as much system level buffering. mmap() uses the same cache, but just gives direct access to it. But it's possible I'm wrong, and I don't seem to be able to find a solid source for this online. This page references this, though: http://duartes.org/gustavo/blog/post/page-cache-the-affair-between-mem… I feel like I've read other more explicit descriptions, although possibly offline.
lnguyen · 2009-02-05
Whenever someone comments on the usefulness of unit testing (or in the extreme, testing in general), I point them to Feynman's contribution to the Challenger shuttle report: Appendix F - Personal Observations on Reliability of Shuttle http://www.ralentz.com/old/space/feynman-report.html A good summary is at http://duartes.org/gustavo/blog/post/richard-feynman-challenger-disast…
timtadh · 2014-11-20
Does anyone, (the author?), know the best reference for x86-64 assembly? I have been a loath to teach it to students because there I haven't found great material for it. I use "Programming from the Ground Up"* as my main text for 32 x86 but haven't found anything comparable for 64 bit. I also use: * http://download.savannah.gnu.org/releases/pgubook/ProgrammingGroundUp-… http://duartes.org/gustavo/blog/post/anatomy-of-a-program-in-memory/ Sun Microsystem Assembler Reference http://docs.oracle.com/cd/E19455-01/806-3773/index.html (not because we use that assembler, we use gas for gcc compat, but it very clearly describes all of the usual 32 bit opcodes) The Intel manuals http://www.intel.com/content/www/us/en/processors/architectures-softwa… Another Intel manual http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64… EDIT: I agree with everyone one, I also learned via doing, decompiling small C programs, gdb, and manuals. However, I am looking for something a bit gentler. That process will work for the top 10% but the rest will struggle and at the end of the day they need to write an x86 code generator so without knowing how to write assembly they are in trouble.
bane · 2014-07-15
No. ASM is just a slightly easier mnemonic version of the raw machine language. All software basically compiles down to this form. The OS functions are provided here. The "game" is just an application in the OS (kinda). The BIOS provides whatever the OS needs to hook into to use the hardware. Here's a high-level overview of how this works http://duartes.org/gustavo/blog/post/how-computers-boot-up/ OS's don't need to be very complicated, just a few bytes in some cases depending on what you want to do. For example, you can just use the standard VGA modes (here, he's using 13h) to get something to display, and just write directly to the video memory. The BIOS helps handle some of the interface work to the various standard components. This is the real old-school way of doing things and the code is really well done and commented. If you know x86 asm basics, you can read through most of the system-level stuff without too much trouble.
naner · 2011-10-17
http://stevehanov.ca/blog/ -- Updates infrequently. Very good programming articles. http://duartes.org/gustavo/blog/ -- Updates infrequently. Good articles on Linux and Programming. Start here: http://duartes.org/gustavo/blog/best-of http://catonmat.net -- He doesn't update much anymore since he's working on his startup but the archives are still good. Mostly unix tools and CompSci stuff IIRC. http://chneukirchen.org/trivium/ -- Curates unix and plan9 articles and some lower level/systems programming stuff with a few other peculiarities sprinkled in. http://www.foldl.org/ -- Curated programming/compsci stuff from certain subreddits. Didn't last long, archives still have some gems. http://lambda-the-ultimate.org/ -- I actually don't read the articles that often anymore but I scan the titles as if it were a ticker of what's going on in the programming world. If someone could point me to more curated sources like foldl, I'd appreciate it. Non-programming: http://ryanholiday.net -- http://www.ryanholiday.net/an-introduction-to-me/ http://thelastpsychiatrist.com/ -- I skip the pharma articles that are way over my head. Cultural deconstructionism.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close