What must the application do when it is finished running?

### A good answer might be:

Pass control back to the operating system.

# Multitasking

With DOS, programs were passed control, ran until completion, then passed control back to DOS. So only one application ran at a time. Worse, an application that messed up might never return control to DOS and the whole system would freeze.

Modern computer systems (1960 and later for mainframes, from 1978 for microcomputers, from about 1995 for Windows PCs) include features that can interrupt the control flow of an executing program. After the flow is interrupted, the operating system can give control to another application. It this is done many times a second the computer system appears to be simultaneously executing several applications. This trick is called multitasking.

The MIPS chip has very good support for multitasking. But this is an advanced topic not included in our basic programming model.

### QUESTION 11:

Do human brains do multitasking?