A computer’s overall function is controlled by its operating system and central processing unit (CPU). The operating system like Windows or MacOS manages allocation of system resources while the CPU carries out processes by executing machine code instructions for the software being used.