CreateThread vs PsCreateSystemThread - What is the difference?

1.4k Views Asked by At

I would like to ask what are the differences between PsCreateSystemThread and CreateThread. From MSDN description it seems to that PsCreateSystemThread is for Kernel Thread.

CreateThread seem like a kernel thread but share the same virtual space memory with a process. That mean I can have many thread running together BUT I cant access other process memory space.

2

There are 2 best solutions below

0
On

CreateThread creates user mode thread that works in the address space of the process. It has nothing to do with kernel. This API is about 20 years old.

PsCreateSystemThread creates kernel thread.

0
On

CreateThread creates a thread to execute within the virtual address space of the calling process, while PsCreateSystemThread creates a system thread that executes in kernel mode and returns a handle for the thread.