In computer science, the ostrich algorithm is a strategy of ignoring potential problems on the basis that they may be exceedingly rare.
It is named after the ostrich effect which is defined as "to stick one's head in the sand and pretend there is no problem".
It is used when it appears the situation may be more cost-effectively managed by allowing the problem to continue to occur rather than to attempt its prevention.
This approach may be used in dealing with deadlocks in concurrent programming if they are believed to be very rare and the cost of detection or prevention is high.
The ostrich algorithm pretends there is no problem and is reasonable to use if deadlocks occur very rarely and the cost of their prevention would be high.