LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2015, 01:08 AM   #1
david_8274
Member
 
Registered: Jun 2013
Location: California
Distribution: Ubuntu, Fedora
Posts: 75

Rep: Reputation: Disabled
can pthread be preemptive ?


Hi all,

I have read about that pthread (or in general, userland threads) are cooperative. Is it true? Is there a "preemptive mode" for pthread?

Thanks,
Wei Xu
 
Old 09-16-2015, 07:51 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
On linux (using pthreads) they are treated as separate processes.

You can see that using "ps -eLf", "ps axms" or "top -H". Each thread is scheduled independently by the kernel.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel with non-preemptive scheduling nik_nik Linux - General 1 05-02-2010 03:31 AM
Kernel with non-preemptive process scheduling... nik_nik Linux - Newbie 2 05-01-2010 05:06 PM
Preemptive kernel aravinda78 Linux - General 1 12-12-2008 09:28 AM
Is Preemptive strike on US possible ? rvijay General 76 08-20-2005 01:45 PM
gentoo preemptive kernel lyx0m Linux - General 4 10-27-2003 12:10 AM


All times are GMT -5. The time now is 02:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration