Results 1 to 7 of 7

Thread: In Linux 2.6.31 kernel scheduler how to assign threads in each core?

  1. #1
    Join Date
    Sep 2010
    Posts
    124

    In Linux 2.6.31 kernel scheduler how to assign threads in each core?

    I recently heard that the Operating system Linux 2.6.31 can support SMP (symmetric multiprocessing), for multiprocessor computer hardware architecture. It also supports CMP. But it cannot perform by using multi core. There still now no operating system created which can support multi-core architecture. How can I assign a thread in each core of the multi-core architecture, say like LINUX? Any information will greatly appreciate...

  2. #2
    Join Date
    Apr 2008
    Posts
    3,424

    Re: In Linux 2.6.31 kernel scheduler how to assign threads in each core?

    Few days ago I had also that type of issue and found a script which clears my issue, and now it is really works in LINUX. I can apply thread to each core of the multi-core architecture. A typical pseudo code for multi thread is look like:
    Code:
    launch thread A (thread 1)
    launch thread B (thread 2)
    ...
    launch thread Z
    -----
    thread A
    initialization part of A
    loop:
       get item from message/queue (wait if necessary)
       do work
       if done or error then exit
    goto loop

  3. #3
    Join Date
    May 2008
    Posts
    3,516

    Re: In Linux 2.6.31 kernel scheduler how to assign threads in each core?

    If you add affinity and attached with a multi-threaded program then during initialization of a single part of thread you are required to add codes which determines what are the cores are available in the thread(means, the availability of the number of hardware threads). Which can allocated by the “cpi”, it allocated in each cores. Other factor is FPU and IO, that determines which core in the hardware thread is used. Then a sytem API called to migrate the current software execution into the core of the thread, and protect to run on that core. After that a core is added which loads the value of CPI of the single thread for the functional code.

  4. #4
    Join Date
    Apr 2008
    Posts
    3,339

    Re: In Linux 2.6.31 kernel scheduler how to assign threads in each core?

    According to your post the problem is occurred for the thread cpi, it is depends on the executed codes and the data which is processed together regarding the other system situated thread activities. So it will differ whatever you calculate. Also mind that if you rearrange a thread or group of threads, a shortage of period of ‘cpi’ values will occur for relocated of caches. It means that it needs a long run time by spread up the frequency time period.

  5. #5
    Join Date
    May 2008
    Posts
    2,945

    Re: In Linux 2.6.31 kernel scheduler how to assign threads in each core?

    As in the above thread it is mentioned that, the value of ‘cpi’ will differ by calculating one set of thread and also likely differ for different set of assigned thread, remember one thing keep the history of the thread configuration about ‘cpi’, beside that use the estimated history of optimal distribution till the ‘cpi’ levels off. Then record it into history.

  6. #6
    Join Date
    Feb 2008
    Posts
    2,635

    Re: In Linux 2.6.31 kernel scheduler how to assign threads in each core?

    Regarding the heuristic scheduling algorithms, if you are interested on this then you can construct the constructor like parallel_for and parallel_reduce. As for example dynamically load balancing system. If you are doing characterize performance then the CPI instructs the ratio for the retires. It will reduce individual floating point instructions with vector instructions which is used for multiple floats at a sequence.

  7. #7
    Join Date
    Jan 2006
    Posts
    3,792

    Re: In Linux 2.6.31 kernel scheduler how to assign threads in each core?

    Throughout the termination the program all the effort for tuning may change, which runs the program. If this is an compute band machine all the tasks will based on the thread for example TBB(an traditional threading environment). According to your post it is difficult to say which technique is better for the application. It depends on the performance.

Similar Threads

  1. How to assign Swap Space on Linux PC
    By Orlando in forum Guides & Tutorials
    Replies: 1
    Last Post: 13-07-2012, 03:34 PM
  2. Running cron on linux even scheduler
    By Sartaj^Crown in forum Operating Systems
    Replies: 5
    Last Post: 03-01-2011, 12:05 AM
  3. Want to know about 2.6 Kernel in Linux
    By mewlyo in forum Operating Systems
    Replies: 4
    Last Post: 26-12-2010, 08:53 AM
  4. Windows Scheduler vs. Linux Scheduler
    By Garlands in forum Operating Systems
    Replies: 3
    Last Post: 08-11-2010, 04:00 PM
  5. Replies: 5
    Last Post: 23-04-2010, 12:36 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,950,707.58498 seconds with 17 queries