Who schedules threads?

Threads are primarily scheduled by the (operating system’s) (OS) scheduler. However, within an application, a programming language’s runtime or a thread library can also implement user-level thread scheduling.