yes, option d is correctas both b and c are true.
rc=rc+1 executes in three instructions so
Case(1) readers and writers at the same time in database:
suppose there are two reader R1 and R2 and writer W1
W1 excutes Down (db) and makes db =0 goes in/uses Database
now R1 executes Rc=Rc+1 update Rc=1 and preempts
then R2 executes Rc=Rc+1 and down mutex changing mutex=0 and condition if(Rc==1) is false so Reader R2 goes into Database and W1 already in Database.
Case2: for deadlock
suppose there are two reader R1 and R2 and writer W1. R1 already in Database by making Mutex=1 db=0 and Rc=1. if writer W1 tries to write will suspend on down(db).
and now reader R2 tries to read the database and R1 tries to come out of database as follows
R2 updates Rc=2 then R1 tries to come out of database by updating Rc=Rc-1=2-1=> Rc=1 makes condition if(rc==0) false and makes mutex=1 and db unchanged and rc=1.
now R2 excutes down (mutex) mutex=0 succesfully and then checks the condition if (rc==1) which is true so executes down (db) and suspend on db. now another readers will be suspended on mutex and writers will be at db.and deadlock occurs.
i think its correct. but may go wrong. verify it.