To aviod the deaglock issue reported during testing, enhancing this code to have local connections and add dependency check via the monitor

Change-Id: I10a2fe5a4157cde3d94840d42178d7bf1b183b11
Merge "To aviod the deaglock issue reported during testing, enhancing this code to have local connections and add dependency check via the monitor" into R1.10