
Anatomy of the thread suspension mechanism in Windows - 68c12c16
https://ntopcode.wordpress.com/2018/01/16/anatomy-of-the-thread-suspension-mechanism-in-windows-windows-internals/
======
mrguyorama
I don't know why, but I have a profound love for learning about how Windows
works. I could go out and read the raw linux source code and find out
everything, but I tend to find NT's architecture more appealing. I ended up
buying the Windows Internals books for fun.

This interest has lead me to have a much better understanding of how and when
things go wrong on my personal desktop, and how to troubleshoot them. I wonder
how much of the hate Windows gets from developers is simply people feeling
confused and left out of the information bubble.

~~~
nlawalker
Any resources you'd recommend?

~~~
mrguyorama
The series of books known as "Windows System Internals"[0]

Raymond Chen of "Old New Thing" fame and all his friends[1]

The creator of process monitor occasionally writes nice blog posts about
troubleshooting[2]

A lot of historical NT stuff is still valid, or at least mildly relevant
today.

[0][https://www.amazon.com/Windows-Internals-Part-
architecture-m...](https://www.amazon.com/Windows-Internals-Part-architecture-
management/dp/0735684189/ref=sr_1_1?ie=UTF8&qid=1516387923&sr=8-1&keywords=windows+system+internals)

[1][https://blogs.msdn.microsoft.com/oldnewthing/](https://blogs.msdn.microsoft.com/oldnewthing/)

[2][https://blogs.technet.microsoft.com/markrussinovich/2005/10/...](https://blogs.technet.microsoft.com/markrussinovich/2005/10/31/sony-
rootkits-and-digital-rights-management-gone-too-far/)

------
p2t2p
If people are so keen on managing their threads on so low level, why not go
the officially supported path and use user mode scheduling -
[https://msdn.microsoft.com/en-
us/library/windows/desktop/dd6...](https://msdn.microsoft.com/en-
us/library/windows/desktop/dd627187\(v=vs.85\).aspx)

------
tlb
That code image reminds of how much I hated Windows code. Everything is bad:
the layout, spacing, capitalization, colors and fonts. From the overall screen
to the individual pixels, they all make me want to scratch my eyes out. Look
at those {} and @ glyphs!

Compare to
[https://www.macintoshrepository.org/1645-codewarrior-4-gold-...](https://www.macintoshrepository.org/1645-codewarrior-4-gold-68k-),
which manages to look fine in a similar number of pixels.

If your source code/editor/fonts produces screen contents so ugly that people
with taste can't bear to look at it, the end-user experience isn't going to be
awesome.

Edit: I see now it's decompiled code. But the original source was probably
written by someone looking at that same font (FixedSys?). Assuming that
function originated in Windows NT, they would have been editing on an earlier
version of Windows.

~~~
dpark
You're looking at a screenshot of some pseudocode and somehow asserting that
this is what "Windows code" looks like, as if Windows code is stored in PNG
format instead of a text format that allows you to use your own preferred
editor, font, and coloring. That's not even what Visual Studio looks like.
It's pseudocode generated by IDA. It's literally not even "Windows code".

You're somehow even critical of the "individual pixels". The individual pixels
are in your screen and if you can't bear to look at them, get a better
monitor.

What you're doing here isn't demonstrating taste. Your criticism is shallow
and uninformed. This is at best snobbery.

Disclosure: Microsoft employee and generally annoyed by superficial
snobbishness.

