Sesi Tanya & Jawab Hari ini hadir untuk memberi kami hak milik sub divisi SuperUser—a Stack Exchange, pengelompokan situs Q & A berbasis komunitas.
Pertanyaan
Pembaca SuperUser Agovizer mengambil pandangan yang agak lama ke meja Tabel tampilan proses di Windows Task Manager dan kembali dengan beberapa pertanyaan, khususnya:
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.
Kami melompat ke dalam Task Manager di mesin kami dan cukup yakin tidak ada proses yang ditetapkan dalam slot 1, 2, dan 3 - meskipun PID kami melompat dari 4 hingga 340, dibandingkan dengan 4 hingga 200.
Jawabannya
Kontributor SuperUser G Koe menutup kasus ini dalam satu kali:
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
Semua yang dia sarankan untuk diperiksa: kita kehilangan 1, 2, dan 3 (bukan kelipatan 4) dan setiap nilai PID dalam daftar kami dari 340 hingga 13136 habis dibagi 4.
Memiliki sesuatu untuk ditambahkan ke penjelasan? Bicaralah di komentar. Ingin membaca lebih banyak jawaban dari pengguna Stack Exchange yang paham teknologi lainnya? Lihat diskusi lengkap di sini.