Thread: POSIX threads policy and priority

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    36

    POSIX threads policy and priority

    Hi!

    I am using posix threads in my application. I am explicitly setting the priorities and the scheduling policy. POSIX threads support 3 types of scheduling - FIFO, RR and OTHER. My second thread needs most of the CPU cycles. Can anybody please clarify what the scenario will be if I use FIFO or RR for my threads but assign different priorities to them? How can I give my second thread the greater part of the CPU cycles?

    Thanks and regards,

    Arun

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    What have you managed to figure out from reading the manual?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    36
    Hi Salem,

    Thanks for taking interest. What I need to know specifically is does Linux 2.4 manage threads with different priorities but same scheduling policy in the same task list? What is the outcome if two threads have different priorities and also different policies? Is it possible to use two different different scheduling policies for two distinct threads? My main() which spawns the two threads returns just after spawning by calling pthread_exit(); Please help.

    Regards,

    Arun

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Scheduling Policy
    By edesign in forum Linux Programming
    Replies: 9
    Last Post: 05-12-2009, 08:47 PM