In this paper a new algorithm based on the centralized algorithm for mutual exclusion in distributed systems is proposed that instead of one coordinator uses two coordinator On separate sites (But every moment One of them as coordinator whole system).In our method, if for any reason main Coordinator crashes, until recovery it, secondary coordinator controls critical section versus Simultaneous accesses of processes and prevents simultaneous accesses to shared resources. Its functionality is like to centralized algorithm; processes send your request for entrance to critical section first to main coordinator and if it has been crashed, send your request to secondary coordinator. Unlike the centralized algorithm in proposed algorithm coordinator is not a point of failure and with crashing coordinator, entire system doesn't go down. The proposed algorithm against the failure of coordinator is much flexible.