An operating system (OS) manages hardware resources and allows applications to interface with the computer. Without an OS, every application would need to include code to handle low-level hardware functionality. Common OS functions include resource allocation, memory management, device management, user interfaces, and security. Popular desktop OS examples are Windows, macOS, and Linux, while mobile OS examples are iOS and Android. The market is currently dominated by Windows on desktops and Android on mobile devices.