POSIX threads policy and priority

This is a discussion on POSIX threads policy and priority within the Linux Programming forums, part of the Platform Specific Boards category; Hi! I am using posix threads in my application. I am explicitly setting the priorities and the scheduling policy. POSIX ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,592
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21