Diff between Semaphore and Completion Variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I would appreciate if some one could explain the difference between
"completion" variables and the semaphores in Linux.

As far as I can understand, both are used to provide synchronization
among kernel threads. Both have similar mechanism i.e. one or more
tasks wait on the completion variable (or semaphore) while another
task holds it and does some work (in critical section). When the task
holding the completion variable (or semaphore) is done, it signals the
other task using "complete" (or "up"). This would cause the waiting
tasks to wait up.

So why have two different things to do the same thing?

Thanks,

Rajat

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux