Današnja pitanja o pitanjima i odgovorima daju nam zahvaljujući SuperUser, podjela Škole razmjene, zajednice-driven grupiranje Q & A web stranica.
Pitanje
SuperUser čitač Agovizer je dugo teško pogledati na stol Obradi prikaz tablice u Windows Task Manager i vratio s nekim pitanjima, a posebno:
What processes, if any, exist between PIDs 0 and 4 on Windows 7? Just out of curiosity what are the processes between 0 and 4, and also between 4 and 200 something.
Prebacili smo se u Task Manager na našem stroju, a sigurno nije bilo procesa dodijeljenih u utorima 1, 2 i 3, iako su naši PID-ovi skočili s 4 na 340, za razliku od 4 do 200.
Odgovor
Gupiter G Koe zatvara slučaj u jednom trenutku:
There is no Process ID 1, 2, or 3 because of how the NT kernel handle table works.
Handles are always multiples of four. The Kernel handle process object is used for both process handles and process/thread IDs. It happens that handle values all start at 0x4 (bit 2), and the InitialSystemProcess is the first process to be created, so it gets a PID of 4. Idle process isn’t actually a process and you can’t open it. It probably doesn’t have a real PID but most tools consider it to be 0.
More on the NT handle table here although this is only accurate for NT3-5(xp), as Windows 7 now requires that you only reference kernel handles if attached to PsInitialSystemProcess.
More on Windows 7/8 Handle limits from Mark Russinovich
More on the “multiples of four” in PIDs
Sve što predlaže provjerava: mi nedostaju 1, 2 i 3 (ne višekratnici od 4), a svaka PID vrijednost na našem popisu od 340 do 13136 djeljiva je za 4.
Imate li nešto za objašnjenje? Zvuči u komentarima. Želite li pročitati više odgovora od drugih tehnoloških korisnika Stack Exchangea? Pogledajte ovdje cijelu raspravu.