LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 12: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, 06:51 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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



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 02:31 AM
Kernel with non-preemptive process scheduling... nik_nik Linux - Newbie 2 05-01-2010 04:06 PM
Preemptive kernel aravinda78 Linux - General 1 12-12-2008 08:28 AM
Is Preemptive strike on US possible ? rvijay General 76 08-20-2005 12:45 PM
gentoo preemptive kernel lyx0m Linux - General 4 10-26-2003 11:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:35 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
Open Source Consulting | Domain Registration