My bad. i wrongly read the code as CS holding its private lock (different from the AbstractYarnScheduler) because of which i had given earlier few comments. Now i realize many things clearly. Thanks to Sunil G (for offline chat) and Tan, Wangda for clarifying it.
But just one more doubt.
FairScheduler holds write lock while doing super.nodeUpdate(nm) and CS holds read lock, should it not be that we should hold a lock inside AbstractYarnScheduler.nodeUpdate(RMNode) as AbstractYarnScheduler.nodeUpdate is mainly sending out the events for the container finished, updating the health status. In fact all the AYS.nodeUpdate operations could be done even without any lock so multiple nodes could update these states in parallel, but may be read lock is required so that write lock will wait for all readlock operations to finish and then do operations under it.
For the first point "removing the syncronization on nodeUpdate and extending and keeping it in FifoScheduler" will update the patch.