What are a safe state and an unsafe state?
Answer: A state is safe if the system can allocate resources to every process in some order and still avoid a deadlock. A system is in safe state only if there exists a safe sequence. A sequence of processes is a safe sequence for the present allocation state if, for each Pi, the resource that Pi can still request can be satisfied by the present available resource in addition the resource held by all the Pj, with j