Locks are required to allow ships to navigate on man-made waterways by regulating water levels. A compartment known as the flooding chamber is closed at each end by a mobile watertight gate. According to the laws of communicating vessels, valves are operated to balance the water levels inside the chamber and outside it in the upper or lower water course.