In a modern operating system, multiple threads can be active at one time, especially in systems with multiple CPU cores. Each CPU core can typically execute one thread simultaneously. Therefore, the number of active threads can be equal to the number of CPU cores, allowing for parallel execution and better utilization of hardware resources. This approach supports multithreading, concurrency, and improved system performance.
However, in the context of a single-threaded system, only one thread can be active and executing instructions at a time. This means that the CPU executes instructions from a single thread until it completes or is interrupted, after which it may switch to another thread based on the scheduling mechanism.