解:信号量初值S1=0,S2=0,S=1
爸爸进程 妈妈进程 女儿进程 儿子进程
repeat repeat repeat repeat
P(s) P(s) P(s1) P(s2)
放苹果 放桔子 取苹果 取桔子
V(s1) V(s2) V(s) V(s)
until false until false until false until false