PV 操作与同步互斥 — 计算机填空题
题目
读者—写者问题中,信号量 mutex(初值 1)用于保护计数变量 readcount(初值 0),信号量 w(初值 1)用于实现读写互斥。读者进程进入时依次执行:P(mutex); readcount=readcount+1; if readcount==1 then P(w); V(mutex);。若当前 readcount 为 0 且无写者,第一个读者执行完 V(mutex) 后,正处于临界区读数据时,信号量 mutex 的值为____,信号量 w 的值为____。