dbms checks them periodically, if it is found, the victim transaction is aborted
the dbms periodically tests the database for deadlocks
the dbms periodically tests the database for deadlocks  if a deadlock is found, one of the transactions (&"victim&") is aborted, and the other transaction continues.