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
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux