But As clearly mentioned in the Galvin Book:
A state is safe if the system can allocate resources to each process (up to its maximum) in some order and still avoid a deadlock. More formally! a system is in a safe state only if there exists a safe sequence. A sequence of processes < PI! P2! ...! PI/> is a safe sequence for the current allocation state it for each Pi! the resource requests that Pi can still make can be satisfied by the currently available resources plus the resources heldby all Pi, withj < i.
From this definition i can solve like this:
Let us take 11 processes i.e. P1, P2, ……...P11. now we allocate 2 resources to each process. Now total 22 resources are allocated to these process and we left with 8 resources now With these 8 resources we can easily get a safe sequence satisfy the need of all the process as :
Safe sequence : P1,P2……...P11.
Hence system is still in safe state. So I think answer should be 11. Please correct me if i am wrong?