Path: utzoo!mnetor!uunet!mcvax!prlb2!kulcs!bart From: bart@kulcs.UUCP (Bart De Decker) Newsgroups: comp.os.minix Subject: Deadlock in Minix Message-ID: <1064@kulcs.UUCP> Date: 4 Dec 87 00:29:49 GMT Organization: Kath.Univ.Leuven, Comp. Sc., Belgium Lines: 36 Keywords: deadlock, sys_call bug I added the following code to kernel/proc.c. It detects a deadlock that arises when two processes (or tasks) try to send each other a message at the same time. /--------------------------- proc.c.diff ------------------------------/ 156a157,163 > /* check for deadlock */ > if (dest_ptr->p_flags & SENDING) { > printf ("%d sending to %d and vice versa\n", > caller, dest); > p_dmp(); > panic ("... Deadlock detected in mini_send ...", NO_NUM); > } 207a215,221 > /* avoid receiving reply before having sent request */ > if (caller_ptr->p_flags & SENDING) { > printf ("%d sending to %d and vice versa\n", > caller, sender); > p_dmp(); > panic ("... Deadlock detected in mini_rec ...", NO_NUM); > } /------------------------------ end -------------------------------------/ Not really a solution, but it shows clearly the deadlock problem ... -- Bart ================================================================================ || Bart De Decker mail: Katholieke Universiteit Leuven || || - research assistant - Dept. Computer Science || || Tel: +32 16 200656 x 3556 Celestijnenlaan 200 A || || E-mail: bart@kulcs.UUCP B-3030 Heverlee || || ... mcvax!prlb2!kulcs!bart Belgium || || bart@kulcs.BITNET || ================================================================================