Deep space communications are intermittent: the communications link only exists when a dish antenna is aimed at the spacecraft. If a spacecraft has an emergency, nobody knows about it until the next scheduled DSN contact.
DSN traffic is scheduled by the DSN organization. When a scheduled contact finds a problem, the schedule can be rearranged. I assume this involves some negotiation between DSN and the scheduled users, but haven't found data on this process.
The largest antennas of the DSN are often called on during spacecraft emergencies. Almost all spacecraft are designed so normal operation can be conducted on the smaller (and more economical) antennas of the DSN, but during an emergency the use of the largest antennas is crucial. This is because a troubled spacecraft may be forced to use less than its normal transmitter power, attitude control problems may preclude the use of high-gain antennas, and recovering every bit of telemetry is critical to assessing the health of the spacecraft and planning the recovery.
The most famous example is the Apollo 13 mission, where limited battery power and inability to use the spacecraft's high-gain antennas reduced signal levels below the capability of the Manned Space Flight Network, and the use of the biggest DSN antennas (and the Australian Parkes Observatory radio telescope) was critical to saving the lives of the astronauts. While Apollo was also a US mission, DSN provides this emergency service to other space agencies as well, in a spirit of inter-agency and international cooperation. For example, the recovery of the Solar and Heliospheric Observatory (SOHO) mission of the European Space Agency (ESA) would not have been possible without the use of the largest DSN facilities.
One example of an emergency operation is the recovery of SOHO:
In an attempt to recover SOHO as soon as possible, the Flight
Operations Team continued uplinking commands to the spacecraft via
NASA's Deep Space Network, for at least 12 hours per day (normal pass)
plus all supplementary time given by DSN. The ESA ground stations in
Perth, Vilspa and Redu supported the search for a downlink signal.
Special equipment was set up at the ground stations to search for
spikes in the downlink spectrum and view it in real time at the SOHO
operations facilities at Goddard Space Flight Center.
Analysis by attitude experts led to the conclusion that SOHO went into
a spin around an axis such that the solar panels were faced nearly
edge-on towards the Sun, and thus did not generate any power. Since the
spin axis is fixed in space, as the spacecraft progressed in its orbit
around the Sun, the orientation of the panels with respect to the Sun
gradually changed, resulting in increased solar illumination of the
spacecraft solar arrays as time progressed.
On July 23 researchers at the National Astronomy and Ionosphere Center
(NAIC) in Arecibo, Puerto Rico, used the facility's 305-meter diameter
radio telescope to transmit a signal toward SOHO while the 70-meter
dish of NASA's Deep Space Network in Goldstone (USA) acted as a
receiver, locating the spacecraft's echo and tracking it using radar
techniques for more than an hour. SOHO was found to be slowly rotating
near its expected position in space.