Multi-programming provides best hardware resource utilization. When one process gets completed then another process is scheduled that was waiting in the queue. I don't see any disadvantage of multi-programming.
Advantages 1. High CPU utilization. 2. It appears that many programs are allotted CPU almost concurrently. Disadvantages 1. CPU scheduling is required. 2. To accommodate several jobs in memory, memory management is essential.
What happens after you write “a.out” and press enter. What are the functionality performed by the OS after executable file is created of your code.