If a system does not employ either a deadlock-prevention or a deadlock-avoidance algorithm(for detail see Introduction to Deadlocks, Methods for Handling Deadlocks and Deadlock Avoidance Techniques), then deadlock situation may occur.
In a multi programming environment, several processes may compete for a finite number of resources. A process requests resources, and if the resources are not available at that time, process enters in a waiting state.
The objective of multi-programming is to have some process running at all times, to maximize CPU utilization. The objective of time-sharing system is to switch the CPU among processes so frequently that user can interact