Threads provide a way to improve application performance through parallelism. A thread is a flow of execution through a process's code and has its own program counter, registers, and stack. Threads are lighter weight than processes and allow multitasking within a single process. There are two types of threads: user-level threads, which are managed in userspace libraries, and kernel-level threads, which are managed by the operating system kernel. User-level threads are faster but cannot take advantage of multiprocessing, while kernel-level threads can run in parallel on multiprocessors but are slower to create and manage. Threads must be mapped to kernel threads using a many-to-one, one-to-one, or many