In computer science
, the ostrich algorithm
is a strategy of ignoring potential problems on the basis that they may be exceedingly rare - "to stick your head in the sand and pretend that there is no problem". This assumes that it is more cost-effective to allow the problem to occur than to attempt its prevention.
This approach may be used in dealing with deadlocks in concurrent programming if deadlocks are believed to be very rare, and if the cost of detection or prevention is high.Trade-offs
It is one of the methods of dealing with deadlocks. Other methods are: avoidance (banker's algorithm), prevention, detection and recovery.