Im taking an operating system course.

i understood the code that solved the consumer - producer problem using semaphores.

but what i didnt understood is where do we use these codes...what kind of processes uses this code ?

Recommended Answers

All 3 Replies

> what kind of processes uses this code ?
Things in a producer / consumer relationship of course.

Say an application sending data to a serial port via a serial port driver. The shared buffer is filled by one process and emptied by another, and access needs to be protected to stop the whole thing falling apart.

Alright but i mean these kind of programs are only in the operating system ( kernel in case of linux ) or i can write them to work in user space ? im still confused...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.