are pthreads kernel-space threads?

are pthreads kernel-space threads?

Post by Adhvan Furtad » Sat, 09 Mar 2002 20:42:07



Hi,

It is my first time using pthreads, so i imagine this is a stupid question.
If one thread do some I/O will it block all others threads within the task
or they can work concurrently?

Thanks

Adhvan

 
 
 

are pthreads kernel-space threads?

Post by Chris Lamber » Sun, 10 Mar 2002 06:29:02



> Hi,

> It is my first time using pthreads, so i imagine this is a stupid question.
> If one thread do some I/O will it block all others threads within the task
> or they can work concurrently?

No, it won't block your other threads as long as you don't have a
deadlock (many threads waiting on the same resource, e.g., waiting for
the same pthread_mutex, or waiting for the same pthread_cond_var, etc.)
--VAn

 
 
 

are pthreads kernel-space threads?

Post by Josh Jone » Sun, 10 Mar 2002 15:09:38



> Hi,

> It is my first time using pthreads, so i imagine this is a stupid question.
> If one thread do some I/O will it block all others threads within the task
> or they can work concurrently?

on linux, all threads are "bound", which means that they all contend
for resources on a system-wide scale (see pthread_setattr_scope() ?).
however, on solaris, the pthreads implementation by default chooses
a process scope, so this may not be the case.

--
 J o s h u a   J o n e s  /  www.intmain.net  /  jajones(at)cc.gatech.edu
                                     __                             .~.
 College of Computing at the    |   / /     _  _  _  _  _ __  __    /V\
 Georgia Institue of Technology |  / /__  / / / \// //_// \ \/ /   // \\
 Atlanta, Georgia, U.S.         | /____/ /_/ /_/\/ /___/  /_/\_\  /(   )\
                                         *Debian GNU/Linux*        ^^-^^

 
 
 

are pthreads kernel-space threads?

Post by Adhvan Furtad » Tue, 12 Mar 2002 21:13:58


Thank you (both of you)!

Do you know any useful docs/sites for pthreads programming, semaphores and
so on...?




> > Hi,

> > It is my first time using pthreads, so i imagine this is a stupid
question.
> > If one thread do some I/O will it block all others threads within the
task
> > or they can work concurrently?

> on linux, all threads are "bound", which means that they all contend
> for resources on a system-wide scale (see pthread_setattr_scope() ?).
> however, on solaris, the pthreads implementation by default chooses
> a process scope, so this may not be the case.

> --
>  J o s h u a   J o n e s  /  www.intmain.net  /  jajones(at)cc.gatech.edu
>                                      __                             .~.
>  College of Computing at the    |   / /     _  _  _  _  _ __  __    /V\
>  Georgia Institue of Technology |  / /__  / / / \// file://_// \ \/ /   //
\\
>  Atlanta, Georgia, U.S.         | /____/ /_/ /_/\/ /___/  /_/\_\  /(   )\
>                                          *Debian GNU/Linux*        ^^-^^

 
 
 

are pthreads kernel-space threads?

Post by Josh Jone » Wed, 13 Mar 2002 00:08:00



> Thank you (both of you)!

> Do you know any useful docs/sites for pthreads programming, semaphores and
> so on...?

try searching on google, you should find a _lot_ of help here.

--
 J o s h u a   J o n e s  /  www.intmain.net  /  jajones(at)cc.gatech.edu
                                     __                             .~.
 College of Computing at the    |   / /     _  _  _  _  _ __  __    /V\
 Georgia Institue of Technology |  / /__  / / / \// //_// \ \/ /   // \\
 Atlanta, Georgia, U.S.         | /____/ /_/ /_/\/ /___/  /_/\_\  /(   )\
                                         *Debian GNU/Linux*        ^^-^^

 
 
 

1. Linux kernel scheduling of kernel-space thread - question

Hello!

Can anyone explain how linux schedules kernel-space threads created with
clone()?

Do kernel-space threads behave the same as normal linux processes, in terms
of scheduling I mean? Are they scheduled in the same way as normal processes
are and is their scheduling done by the same scheduler?

Does every created kernel-space thread have it's own task_struct created and
added in kernel's process list for scheduling? What is the role of
thread_struct inside task_struct of every process and has it anything to do
with thread scheduling?

Thanx,

Best regards,                        

                                        Mario Zagar                        

2. looking for dirt

3. Linux kernel scheduling of kernel-space threads - question

4. P6 motherboards?

5. kernel thread VS user space thread in linux

6. how user data is copied from/to kernel

7. Synchronizing user space threads with kernel space in linux

8. Solaris 7 and ksh for root

9. Kernel-space Threads

10. does linux JDK 1.1.x use posix threads (pthreads) or green threads?

11. pthreads based on kernel managed threads for FreeBSD 2.1 almost ready

12. Pthreads/kernel threads

13. PTHREADS kernel/user level threading?