3
votes

I know that fibers run within the context of a thread. They are user-level only.

I know threads can be user level or kernel level.

When you create a thread in a user-level application it is user-level also?

Can you create a kernel-level thread in your user application?

These user-level threads are also scheduled by the kernel?

When you call CreateThread in .NET how does the kernel come into play? Does the CreateThread function need to go through the susbsystem dll to the executive and all the way down to the kernel for creating a user-level thread?

1

1 Answers

0
votes

On the Windows platform threads in user mode processes (applications) are user mode threads and threads in kernel mode processes are kernel mode threads. You can not create a kernel mode thread in a user mode process. On Windows all threads are scheduled by the kernel directly or indirectly (via how it configures CPU interrupts).

The .Net CreateThread ultimately uses the CreateThread API, which is exported from Kernel32.dll.