An operating system allows user programs to interact with hardware by using techniques like multiprogramming and multitasking. Multiprogramming allows more than one user to use a computer at a time by having multiple ready-to-run processes from different users. If the current process stalls, the OS allocates CPU time to another process in the queue to maximize CPU utilization. Multitasking means concurrent execution of multiple processes by one user using multiple CPUs, so a user can work on a document and listen to music at the same time. Job scheduling and CPU scheduling determine which processes get allocated CPU time to make the system efficient, fast and fair.