View previous topic :: View next topic |
Author |
Message |
Marcofras n00b
Joined: 29 May 2023 Posts: 15
|
Posted: Sat Nov 16, 2024 9:13 pm Post subject: parallalization and taskset |
|
|
is it possible have parallalization with taskset?
Code: |
m@localhost ~/Desktop/bitmap $ time taskset -c 1 ./desc && time taskset -c 2 ./desc && time taskset -c 3 ./desc && time taskset -c 4 ./desc
real 0m0.019s
user 0m0.013s
sys 0m0.006s
real 0m0.014s
user 0m0.013s
sys 0m0.001s
real 0m0.012s
user 0m0.011s
sys 0m0.001s
real 0m0.012s
user 0m0.012s
sys 0m0.000s
|
four instance of the program are executed simultaniously with save time? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22660
|
Posted: Sat Nov 16, 2024 11:32 pm Post subject: |
|
|
Why are you using taskset at all? If you want four instances, run four instances: Code: | for a in {0..3}; do ./desc & done; wait | Let the scheduler sort out where to run them. |
|
Back to top |
|
|
|