Create nextlevel for monitor proble

this set of code will provide all condition of philospher problem using monitor.........