Pretty new to threads and OS constructs here,
was wondering if anyone could clear something up for me.
When implementing threads in C you have access to POSIX threads, is a POSIX thread an OS level thread? Running at the kernel level?
And in Java when creating and running threads, are these user level threads? What level of access do we have to OS level constructs in java? Are semaphores in Java just set in the user space?
Thanks in advance for any insight into any of these questions.
POSIX threads are kernel threads. Kernel threads are "normal" threads; you'd know if you were using user threads in C (because you'd have to write the whole threading system yourself).
Java threads are also kernel threads, usually. On Unix-like systems, they may use POSIX threads; on Windows, they use Windows threads. It is conceivable that there is a JVM for a system without threads, and it implements threads itself (as user threads).