Operating Systems. Part b ONLY answer for A is below already Three gardeners are together in a greenhouse with a vendor of gardening supplies. Each gardener needs three items to complete a planting: seeds, potting soil, and manure. The vendor has all of these in infinite quantities. One gardener has her own seeds, the second has his own potting soil, and the third has his own manure. The action begins when the vendor puts two ingredients on a table, allowing one gardener to do a planting. When the appropriate gardener is done, he or she wakes up the vendor, who then puts two more ingredients (at random) on the table, thus unblocking another gardener a.) Using semaphores, write programs for the gardeners and the vendor that solve this problem. (You may find it helpful to first consider the problem of one gardener and the vendor.) b.) turnin this part Using messages, write two solutions for this problem. In the first solution, make a straight-forward substitution of messages for semaphores; that is, replace each semaphore with a mailbox, and replace each P and V operation with Send/Receive as needed. In the second solution, use the messages to convey the items from the vendor to the gardener. Note that this solution eliminates the a.) global: table. semaphore plantingDone createsem(0); vendor waiting gardener specific semaphores* semaphore seeds createsem(O) semaphore soilcreatesem(0); semaphore manure createsem(0); process Vendor while () switch (random3pick a random gardener case 1 put soil and manure on the table V(seeds); wake up gardener Seeds/ break case 2: put seeds and manure on the table V(soil) wake up gardener Seeds / break; case 3 put seeds and soil on the table V(manure)wake up gardener Manure break; P(plantingDone);wait for gardener to finish/ process soil: while () process seeds: process manure: while (I) P(seedsd) get soil & manure; doe a planting: V(plantingDone); while (I) P(soil get seeds & manure; do a planting: V(plantingDone); P(manure); get soil & seeds; do a planting: V(plantingDone)