| 1 |
# Arabic translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# زايد السعيدي <[email protected]>, 2026. |
| 5 |
msgid "" |
| 6 |
msgstr "" |
| 7 |
"Project-Id-Version: manpages-l10n\n" |
| 8 |
"POT-Creation-Date: 2026-06-05 06:42+0200\n" |
| 9 |
"PO-Revision-Date: 2026-05-20 21:08+0400\n" |
| 10 |
"Last-Translator: Zayed Al-Saidi <[email protected]>\n" |
| 11 |
"Language-Team: Arabic <[email protected]>\n" |
| 12 |
"Language: ar\n" |
| 13 |
"MIME-Version: 1.0\n" |
| 14 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 15 |
"Content-Transfer-Encoding: 8bit\n" |
| 16 |
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " |
| 17 |
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" |
| 18 |
"X-Generator: Lokalize 23.08.5\n" |
| 19 |
|
| 20 |
#. type: TH |
| 21 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 22 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 23 |
#, no-wrap |
| 24 |
msgid "sched_setaffinity" |
| 25 |
msgstr "sched_setaffinity" |
| 26 |
|
| 27 |
#. type: TH |
| 28 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 29 |
#: opensuse-tumbleweed |
| 30 |
#, no-wrap |
| 31 |
msgid "2026-02-08" |
| 32 |
msgstr "8 فبراير 2026" |
| 33 |
|
| 34 |
#. type: TH |
| 35 |
#: archlinux debian-unstable |
| 36 |
#, no-wrap |
| 37 |
msgid "Linux man-pages 6.18" |
| 38 |
msgstr "صفحات دليل لينكس 6.18" |
| 39 |
|
| 40 |
#. type: SH |
| 41 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 42 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 43 |
#, no-wrap |
| 44 |
msgid "NAME" |
| 45 |
msgstr "الاسم" |
| 46 |
|
| 47 |
#. type: Plain text |
| 48 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 49 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 50 |
msgid "" |
| 51 |
"sched_setaffinity, sched_getaffinity - set and get a thread's CPU affinity " |
| 52 |
"mask" |
| 53 |
msgstr "" |
| 54 |
"sched_setaffinity, sched_getaffinity - ضبط وجلب قناع التقارب لوحدة المعالجة " |
| 55 |
"المركزية لخيط" |
| 56 |
|
| 57 |
#. type: SH |
| 58 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 59 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 60 |
#, no-wrap |
| 61 |
msgid "LIBRARY" |
| 62 |
msgstr "المكتبة" |
| 63 |
|
| 64 |
#. type: Plain text |
| 65 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 66 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 67 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 68 |
msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)" |
| 69 |
|
| 70 |
#. type: SH |
| 71 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 72 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 73 |
#, no-wrap |
| 74 |
msgid "SYNOPSIS" |
| 75 |
msgstr "موجز" |
| 76 |
|
| 77 |
#. type: Plain text |
| 78 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 79 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 80 |
#, no-wrap |
| 81 |
msgid "" |
| 82 |
"B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n" |
| 83 |
"B<#include E<lt>sched.hE<gt>>\n" |
| 84 |
msgstr "" |
| 85 |
"B<#define _GNU_SOURCE> /* انظر feature_test_macros(7) */\n" |
| 86 |
"B<#include E<lt>sched.hE<gt>>\n" |
| 87 |
|
| 88 |
#. type: Plain text |
| 89 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 90 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 91 |
#, no-wrap |
| 92 |
msgid "" |
| 93 |
"B<int sched_setaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n" |
| 94 |
"B< const cpu_set_t *>I<mask>B<);>\n" |
| 95 |
"B<int sched_getaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n" |
| 96 |
"B< cpu_set_t *>I<mask>B<);>\n" |
| 97 |
msgstr "" |
| 98 |
"B<int sched_setaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n" |
| 99 |
"B< const cpu_set_t *>I<mask>B<);>\n" |
| 100 |
"B<int sched_getaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n" |
| 101 |
"B< cpu_set_t *>I<mask>B<);>\n" |
| 102 |
|
| 103 |
#. type: SH |
| 104 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 105 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 106 |
#, no-wrap |
| 107 |
msgid "DESCRIPTION" |
| 108 |
msgstr "الوصف" |
| 109 |
|
| 110 |
#. type: Plain text |
| 111 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 112 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 113 |
msgid "" |
| 114 |
"A thread's CPU affinity mask determines the set of CPUs on which it is " |
| 115 |
"eligible to run. On a multiprocessor system, setting the CPU affinity mask " |
| 116 |
"can be used to obtain performance benefits. For example, by dedicating one " |
| 117 |
"CPU to a particular thread (i.e., setting the affinity mask of that thread " |
| 118 |
"to specify a single CPU, and setting the affinity mask of all other threads " |
| 119 |
"to exclude that CPU), it is possible to ensure maximum execution speed for " |
| 120 |
"that thread. Restricting a thread to run on a single CPU also avoids the " |
| 121 |
"performance cost caused by the cache invalidation that occurs when a thread " |
| 122 |
"ceases to execute on one CPU and then recommences execution on a different " |
| 123 |
"CPU." |
| 124 |
msgstr "" |
| 125 |
"يحدد قناع تقارب الخيط مجموعة وحدات المعالجة المركزية التي يحق له التشغيل " |
| 126 |
"عليها. في نظام متعدد المعالجات، يمكن استخدام ضبط قناع التقارب للحصول على " |
| 127 |
"فوائد أداء. على سبيل المثال، بتخصيص وحدة معالجة مركزية واحدة لخيط معين (أي " |
| 128 |
"ضبط قناع تقارب ذلك الخيط لتحديد وحدة معالجة مركزية واحدة، وضبط قناع تقارب " |
| 129 |
"جميع الخيوط الأخرى لاستبعاد تلك الوحدة)، يمكن ضمان سرعة تنفيذ قصوى لذلك " |
| 130 |
"الخيط. كما يتجنب تقييد خيط للتشغيل على وحدة معالجة مركزية واحدة التكلفة " |
| 131 |
"الأدائية الناتجة عن إبطال الخبيئة الذي يحدث عندما يتوقف خيط عن التنفيذ على " |
| 132 |
"وحدة معالجة مركزية ثم يُستأنف التنفيذ على وحدة مختلفة." |
| 133 |
|
| 134 |
#. type: Plain text |
| 135 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 136 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 137 |
msgid "" |
| 138 |
"A CPU affinity mask is represented by the I<cpu_set_t> structure, a \"CPU " |
| 139 |
"set\", pointed to by I<mask>. A set of macros for manipulating CPU sets is " |
| 140 |
"described in B<CPU_SET>(3)." |
| 141 |
msgstr "" |
| 142 |
"يُمثل قناع تقارب وحدة المعالجة المركزية بواسطة بنية I<cpu_set_t>، وهي " |
| 143 |
"\"مجموعة وحدات معالجة مركزية\"، يشير إليها I<mask>. تُوصف مجموعة من الكليّات " |
| 144 |
"لمعالجة مجموعات وحدات المعالجة المركزية في B<CPU_SET>(3)." |
| 145 |
|
| 146 |
#. type: Plain text |
| 147 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 148 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 149 |
msgid "" |
| 150 |
"B<sched_setaffinity>() sets the CPU affinity mask of the thread whose ID is " |
| 151 |
"I<pid> to the value specified by I<mask>. If I<pid> is zero, then the " |
| 152 |
"calling thread is used. The argument I<cpusetsize> is the length (in bytes) " |
| 153 |
"of the data pointed to by I<mask>. Normally this argument would be " |
| 154 |
"specified as I<sizeof(cpu_set_t)>." |
| 155 |
msgstr "" |
| 156 |
"تضبط B<sched_setaffinity>() قناع تقارب وحدة المعالجة المركزية للخيط الذي " |
| 157 |
"معرفه هو I<pid> إلى القيمة المحددة بواسطة I<mask>. إذا كان I<pid> صفرًا، " |
| 158 |
"يُستخدم الخيط المستدعِي. الوسيط I<cpusetsize> هو طول (بالبايت) البيانات المشار " |
| 159 |
"إليها بواسطة I<mask>. عادةً ما يُحدد هذا الوسيط كـ I<sizeof(cpu_set_t)>." |
| 160 |
|
| 161 |
#. type: Plain text |
| 162 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 163 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 164 |
msgid "" |
| 165 |
"If the thread specified by I<pid> is not currently running on one of the " |
| 166 |
"CPUs specified in I<mask>, then that thread is migrated to one of the CPUs " |
| 167 |
"specified in I<mask>." |
| 168 |
msgstr "" |
| 169 |
"إذا كان الخيط المحدد بواسطة I<pid> لا يعمل حاليًا على إحدى وحدات المعالجة " |
| 170 |
"المركزية المحددة في I<mask>، فيُهجّر ذلك الخيط إلى إحدى وحدات المعالجة " |
| 171 |
"المركزية المحددة في I<mask>." |
| 172 |
|
| 173 |
#. type: Plain text |
| 174 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 175 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 176 |
msgid "" |
| 177 |
"B<sched_getaffinity>() writes the affinity mask of the thread whose ID is " |
| 178 |
"I<pid> into the I<cpu_set_t> structure pointed to by I<mask>. The " |
| 179 |
"I<cpusetsize> argument specifies the size (in bytes) of I<mask>. If I<pid> " |
| 180 |
"is zero, then the mask of the calling thread is returned." |
| 181 |
msgstr "" |
| 182 |
"تكتب B<sched_getaffinity>() قناع تقارب الخيط الذي معرفه هو I<pid> في بنية " |
| 183 |
"I<cpu_set_t> المشار إليها بواسطة I<mask>. يحدد الوسيط I<cpusetsize> حجم " |
| 184 |
"(بالبايت) I<mask>. إذا كان I<pid> صفرًا، يُعاد قناع الخيط المستدعِي." |
| 185 |
|
| 186 |
#. type: SH |
| 187 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 188 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 189 |
#, no-wrap |
| 190 |
msgid "RETURN VALUE" |
| 191 |
msgstr "قيمة الإرجاع" |
| 192 |
|
| 193 |
#. type: Plain text |
| 194 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 195 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 196 |
msgid "" |
| 197 |
"On success, B<sched_setaffinity>() and B<sched_getaffinity>() return 0 " |
| 198 |
"(but see \"C library/kernel differences\" below, which notes that the " |
| 199 |
"underlying B<sched_getaffinity>() differs in its return value). On " |
| 200 |
"failure, -1 is returned, and I<errno> is set to indicate the error." |
| 201 |
msgstr "" |
| 202 |
"عند النجاح، تُعيد B<sched_setaffinity>() و B<sched_getaffinity>() 0 (لكن انظر " |
| 203 |
"\"الاختلافات بين مكتبة C والنواة\" أدناه، حيث يُلاحظ أن " |
| 204 |
"B<sched_getaffinity>() الأساسية تختلف في قيمة إرجاعها). عند الفشل، يُعاد -1، " |
| 205 |
"ويُضبط I<errno> للإشارة إلى الخطأ." |
| 206 |
|
| 207 |
#. type: SH |
| 208 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 209 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 210 |
#, no-wrap |
| 211 |
msgid "ERRORS" |
| 212 |
msgstr "الأخطاء" |
| 213 |
|
| 214 |
#. type: TP |
| 215 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 216 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 217 |
#, no-wrap |
| 218 |
msgid "B<EFAULT>" |
| 219 |
msgstr "B<EFAULT>" |
| 220 |
|
| 221 |
#. type: Plain text |
| 222 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 223 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 224 |
msgid "A supplied memory address was invalid." |
| 225 |
msgstr "عنوان الذاكرة المقدم غير صالح." |
| 226 |
|
| 227 |
#. type: TP |
| 228 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 229 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 230 |
#, no-wrap |
| 231 |
msgid "B<EINVAL>" |
| 232 |
msgstr "B<EINVAL>" |
| 233 |
|
| 234 |
#. type: Plain text |
| 235 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 236 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 237 |
msgid "" |
| 238 |
"The affinity bit mask I<mask> contains no processors that are currently " |
| 239 |
"physically on the system and permitted to the thread according to any " |
| 240 |
"restrictions that may be imposed by I<cpuset> cgroups or the \"cpuset\" " |
| 241 |
"mechanism described in B<cpuset>(7)." |
| 242 |
msgstr "" |
| 243 |
"لا يحتوي قناع البتات للتقارب I<mask> على أي معالجات موجودة فعليًا حاليًا على " |
| 244 |
"النظام ومسموح بها للخيط وفقًا لأي قيود قد تُفرض بواسطة مجموعات تحكم I<cpuset> " |
| 245 |
"أو آلية \"cpuset\" الموصوفة في B<cpuset>(7)." |
| 246 |
|
| 247 |
#. type: Plain text |
| 248 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 249 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 250 |
msgid "" |
| 251 |
"(B<sched_getaffinity>() and, before Linux 2.6.9, B<sched_setaffinity>()) " |
| 252 |
"I<cpusetsize> is smaller than the size of the affinity mask used by the " |
| 253 |
"kernel." |
| 254 |
msgstr "" |
| 255 |
"(B<sched_getaffinity>() وقبل Linux 2.6.9، B<sched_setaffinity>()) " |
| 256 |
"I<cpusetsize> أصغر من حجم قناع التقارب المستخدم بواسطة النواة." |
| 257 |
|
| 258 |
#. type: TP |
| 259 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 260 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 261 |
#, no-wrap |
| 262 |
msgid "B<EPERM>" |
| 263 |
msgstr "B<EPERM>" |
| 264 |
|
| 265 |
#. type: Plain text |
| 266 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 267 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 268 |
msgid "" |
| 269 |
"(B<sched_setaffinity>()) The calling thread does not have appropriate " |
| 270 |
"privileges. The caller needs an effective user ID equal to the real user ID " |
| 271 |
"or effective user ID of the thread identified by I<pid>, or it must possess " |
| 272 |
"the B<CAP_SYS_NICE> capability in the user namespace of the thread I<pid>." |
| 273 |
msgstr "" |
| 274 |
"(B<sched_setaffinity>()) لا يمتلك الخيط المستدعِي الامتيازات المناسبة. يحتاج " |
| 275 |
"المستدعِي إلى معرف مستخدم فعال يساوي معرف المستخدم الحقيقي أو معرف المستخدم " |
| 276 |
"الفعال للخيط المحدد بواسطة I<pid>، أو يجب أن يمتلك القدرة B<CAP_SYS_NICE> في " |
| 277 |
"فضاء أسماء المستخدم للخيط I<pid>." |
| 278 |
|
| 279 |
#. type: TP |
| 280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
#, no-wrap |
| 283 |
msgid "B<ESRCH>" |
| 284 |
msgstr "B<ESRCH>" |
| 285 |
|
| 286 |
#. type: Plain text |
| 287 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 288 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 289 |
msgid "The thread whose ID is I<pid> could not be found." |
| 290 |
msgstr "تعذر العثور على الخيط (thread) الذي معرفه I<pid>." |
| 291 |
|
| 292 |
#. type: SH |
| 293 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 294 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 295 |
#, no-wrap |
| 296 |
msgid "STANDARDS" |
| 297 |
msgstr "المعايير" |
| 298 |
|
| 299 |
#. type: Plain text |
| 300 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 301 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 302 |
msgid "Linux." |
| 303 |
msgstr "لينكس." |
| 304 |
|
| 305 |
#. type: SH |
| 306 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 307 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 308 |
#, no-wrap |
| 309 |
msgid "HISTORY" |
| 310 |
msgstr "التاريخ" |
| 311 |
|
| 312 |
#. type: Plain text |
| 313 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 314 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 315 |
msgid "Linux 2.5.8, glibc 2.3." |
| 316 |
msgstr "Linux 2.5.8، glibc 2.3." |
| 317 |
|
| 318 |
#. type: Plain text |
| 319 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 320 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 321 |
msgid "" |
| 322 |
"Initially, the glibc interfaces included a I<cpusetsize> argument, typed as " |
| 323 |
"I<unsigned int>. In glibc 2.3.3, the I<cpusetsize> argument was removed, " |
| 324 |
"but was then restored in glibc 2.3.4, with type I<size_t>." |
| 325 |
msgstr "" |
| 326 |
"في البداية، تضمنت واجهات glibc وسيط I<cpusetsize>، بنوع I<unsigned int>. في " |
| 327 |
"glibc 2.3.3، أُزيل الوسيط I<cpusetsize>، لكنه استُرجع لاحقًا في glibc 2.3.4، " |
| 328 |
"بنوع I<size_t>." |
| 329 |
|
| 330 |
#. type: SH |
| 331 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 332 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 333 |
#, no-wrap |
| 334 |
msgid "NOTES" |
| 335 |
msgstr "ملاحظات" |
| 336 |
|
| 337 |
#. type: Plain text |
| 338 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 339 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 340 |
msgid "" |
| 341 |
"After a call to B<sched_setaffinity>(), the set of CPUs on which the thread " |
| 342 |
"will actually run is the intersection of the set specified in the I<mask> " |
| 343 |
"argument and the set of CPUs actually present on the system. The system may " |
| 344 |
"further restrict the set of CPUs on which the thread runs if the \"cpuset\" " |
| 345 |
"mechanism described in B<cpuset>(7) is being used. These restrictions on " |
| 346 |
"the actual set of CPUs on which the thread will run are silently imposed by " |
| 347 |
"the kernel." |
| 348 |
msgstr "" |
| 349 |
"بعد استدعاء B<sched_setaffinity>()، تكون مجموعة وحدات المعالجة المركزية التي " |
| 350 |
"سيعمل عليها الخيط فعليًا هي تقاطع المجموعة المحددة في الوسيط I<mask> ومجموعة " |
| 351 |
"وحدات المعالجة المركزية الموجودة فعليًا على النظام. قد يُقيّد النظام أيضًا " |
| 352 |
"مجموعة وحدات المعالجة المركزية التي يعمل عليها الخيط إذا استُخدمت آلية " |
| 353 |
"\"cpuset\" الموصوفة في B<cpuset>(7). تُفرض هذه القيود على المجموعة الفعلية " |
| 354 |
"لوحدات المعالجة المركزية التي سيعمل عليها الخيط بصمت بواسطة النواة." |
| 355 |
|
| 356 |
#. type: Plain text |
| 357 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 358 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 359 |
msgid "" |
| 360 |
"There are various ways of determining the number of CPUs available on the " |
| 361 |
"system, including: inspecting the contents of I</proc/cpuinfo>; using " |
| 362 |
"B<sysconf>(3) to obtain the values of the B<_SC_NPROCESSORS_CONF> and " |
| 363 |
"B<_SC_NPROCESSORS_ONLN> parameters; and inspecting the list of CPU " |
| 364 |
"directories under I</sys/devices/system/cpu/>." |
| 365 |
msgstr "" |
| 366 |
"توجد طرق مختلفة لتحديد عدد وحدات المعالجة المركزية المتاحة على النظام، بما " |
| 367 |
"في ذلك: فحص محتويات I</proc/cpuinfo>؛ استخدام B<sysconf>(3) للحصول على قيم " |
| 368 |
"المعاملين B<_SC_NPROCESSORS_CONF> و B<_SC_NPROCESSORS_ONLN>؛ وفحص قائمة أدلة " |
| 369 |
"وحدة المعالجة المركزية تحت I</sys/devices/system/cpu/>." |
| 370 |
|
| 371 |
#. type: Plain text |
| 372 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 373 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 374 |
msgid "B<sched>(7) has a description of the Linux scheduling scheme." |
| 375 |
msgstr "يحتوي B<sched>(7) على وصف لمخطط جدولة لينكس." |
| 376 |
|
| 377 |
#. type: Plain text |
| 378 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 379 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 380 |
msgid "" |
| 381 |
"The affinity mask is a per-thread attribute that can be adjusted " |
| 382 |
"independently for each of the threads in a thread group. The value returned " |
| 383 |
"from a call to B<gettid>(2) can be passed in the argument I<pid>. " |
| 384 |
"Specifying I<pid> as 0 will set the attribute for the calling thread, and " |
| 385 |
"passing the value returned from a call to B<getpid>(2) will set the " |
| 386 |
"attribute for the main thread of the thread group. (If you are using the " |
| 387 |
"POSIX threads API, then use B<pthread_setaffinity_np>(3) instead of " |
| 388 |
"B<sched_setaffinity>().)" |
| 389 |
msgstr "" |
| 390 |
"قناع التقارب هو سمة لكل خيط يمكن ضبطها بشكل مستقل لكل خيط في مجموعة خيوط. " |
| 391 |
"يمكن تمرير القيمة المُعادة من استدعاء B<gettid>(2) في الوسيط I<pid>. سيؤدي " |
| 392 |
"تحديد I<pid> كـ 0 إلى ضبط السمة للخيط المستدعِي، وتمرير القيمة المُعادة من " |
| 393 |
"استدعاء B<getpid>(2) سيضبط السمة للخيط الرئيس لمجموعة الخيوط. (إذا كنت " |
| 394 |
"تستخدم واجهة برمجة تطبيقات خيوط POSIX، فاستخدم B<pthread_setaffinity_np>(3) " |
| 395 |
"بدلاً من B<sched_setaffinity>().)" |
| 396 |
|
| 397 |
#. type: Plain text |
| 398 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 399 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 400 |
msgid "" |
| 401 |
"The I<isolcpus> boot option can be used to isolate one or more CPUs at boot " |
| 402 |
"time, so that no processes are scheduled onto those CPUs. Following the use " |
| 403 |
"of this boot option, the only way to schedule processes onto the isolated " |
| 404 |
"CPUs is via B<sched_setaffinity>() or the B<cpuset>(7) mechanism. For " |
| 405 |
"further information, see the kernel source file I<Documentation/admin-guide/" |
| 406 |
"kernel-parameters.txt>. As noted in that file, I<isolcpus> is the preferred " |
| 407 |
"mechanism of isolating CPUs (versus the alternative of manually setting the " |
| 408 |
"CPU affinity of all processes on the system)." |
| 409 |
msgstr "" |
| 410 |
"يمكن استخدام خيار الإقلاع I<isolcpus> لعزل وحدة معالجة مركزية واحدة أو أكثر " |
| 411 |
"عند الإقلاع، بحيث لا تُجدول أي عمليات على تلك الوحدات. بعد استخدام خيار " |
| 412 |
"الإقلاع هذا، الطريقة الوحيدة لجدولة العمليات على وحدات المعالجة المركزية " |
| 413 |
"المعزولة هي عبر B<sched_setaffinity>() أو آلية B<cpuset>(7). لمزيد من " |
| 414 |
"المعلومات، انظر ملف مصدر النواة I<Documentation/admin-guide/kernel-" |
| 415 |
"parameters.txt>. وكما هو مذكور في ذلك الملف، I<isolcpus> هي الآلية المفضلة " |
| 416 |
"لعزل وحدات المعالجة المركزية (مقارنة بالبديل المتمثل في ضبط تقارب وحدة " |
| 417 |
"المعالجة المركزية يدويًا لجميع العمليات على النظام)." |
| 418 |
|
| 419 |
#. type: Plain text |
| 420 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 421 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 422 |
msgid "" |
| 423 |
"A child created via B<fork>(2) inherits its parent's CPU affinity mask. " |
| 424 |
"The affinity mask is preserved across an B<execve>(2)." |
| 425 |
msgstr "" |
| 426 |
"يرث طفل مُنشأ عبر B<fork>(2) قناع تقارب وحدة المعالجة المركزية لوالده. يُحافظ " |
| 427 |
"على قناع التقارب عبر B<execve>(2)." |
| 428 |
|
| 429 |
#. type: SS |
| 430 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 431 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 432 |
#, no-wrap |
| 433 |
msgid "C library/kernel differences" |
| 434 |
msgstr "الاختلافات بين مكتبة C والنواة" |
| 435 |
|
| 436 |
#. type: Plain text |
| 437 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 438 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 439 |
msgid "" |
| 440 |
"This manual page describes the glibc interface for the CPU affinity calls. " |
| 441 |
"The actual system call interface is slightly different, with the I<mask> " |
| 442 |
"being typed as I<unsigned long\\ *>, reflecting the fact that the underlying " |
| 443 |
"implementation of CPU sets is a simple bit mask." |
| 444 |
msgstr "" |
| 445 |
"تصف صفحة الدليل هذه واجهة glibc لاستدعاءات تقارب وحدة المعالجة المركزية. " |
| 446 |
"تختلف واجهة استدعاء النظام الفعلية قليلاً، حيث يُعرّف I<mask> بنوع I<unsigned " |
| 447 |
"long\\ *>، مما يعكس حقيقة أن التنفيذ الأساسي لمجموعات وحدات المعالجة " |
| 448 |
"المركزية هو قناع بتات بسيط." |
| 449 |
|
| 450 |
#. type: Plain text |
| 451 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 452 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 453 |
msgid "" |
| 454 |
"On success, the raw B<sched_getaffinity>() system call returns the number " |
| 455 |
"of bytes placed copied into the I<mask> buffer; this will be the minimum of " |
| 456 |
"I<cpusetsize> and the size (in bytes) of the I<cpumask_t> data type that is " |
| 457 |
"used internally by the kernel to represent the CPU set bit mask." |
| 458 |
msgstr "" |
| 459 |
"عند النجاح، يُعيد استدعاء النظام الخام B<sched_getaffinity>() عدد البايتات " |
| 460 |
"المنسوخة في مخزن I<mask>؛ وسيكون هذا هو الحد الأدنى لـ I<cpusetsize> وحجم " |
| 461 |
"(بالبايت) نوع البيانات I<cpumask_t> المستخدم داخليًا بواسطة النواة لتمثيل " |
| 462 |
"قناع بتات مجموعة وحدة المعالجة المركزية." |
| 463 |
|
| 464 |
#. type: SS |
| 465 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 466 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 467 |
#, no-wrap |
| 468 |
msgid "Handling systems with large CPU affinity masks" |
| 469 |
msgstr "معالجة الأنظمة ذات أقنعة تقارب وحدة المعالجة المركزية الكبيرة" |
| 470 |
|
| 471 |
#. FIXME . See https://sourceware.org/bugzilla/show_bug.cgi?id=15630 |
| 472 |
#. and https://sourceware.org/ml/libc-alpha/2013-07/msg00288.html |
| 473 |
#. type: Plain text |
| 474 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 475 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 476 |
msgid "" |
| 477 |
"The underlying system calls (which represent CPU masks as bit masks of type " |
| 478 |
"I<unsigned long\\ *>) impose no restriction on the size of the CPU mask. " |
| 479 |
"However, the I<cpu_set_t> data type used by glibc has a fixed size of 128 " |
| 480 |
"bytes, meaning that the maximum CPU number that can be represented is 1023. " |
| 481 |
"If the kernel CPU affinity mask is larger than 1024, then calls of the form:" |
| 482 |
msgstr "" |
| 483 |
"لا تفرض استدعاءات النظام الأساسية (التي تمثل أقنعة وحدة المعالجة المركزية " |
| 484 |
"كأقنعة بتات من نوع I<unsigned long\\ *>) أي قيود على حجم قناع وحدة المعالجة " |
| 485 |
"المركزية. ومع ذلك، فإن نوع البيانات I<cpu_set_t> المستخدم بواسطة glibc له " |
| 486 |
"حجم ثابت يبلغ 128 بايت، مما يعني أن الحد الأقصى لرقم وحدة المعالجة المركزية " |
| 487 |
"الذي يمكن تمثيله هو 1023. إذا كان قناع تقارب وحدة المعالجة المركزية للنواة " |
| 488 |
"أكبر من 1024، فإن استدعاءات النموذج:" |
| 489 |
|
| 490 |
#. type: Plain text |
| 491 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 492 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 493 |
#, no-wrap |
| 494 |
msgid "sched_getaffinity(pid, sizeof(cpu_set_t), &mask);\n" |
| 495 |
msgstr "sched_getaffinity(pid, sizeof(cpu_set_t), &mask);\n" |
| 496 |
|
| 497 |
#. type: Plain text |
| 498 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 499 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 500 |
msgid "" |
| 501 |
"fail with the error B<EINVAL>, the error produced by the underlying system " |
| 502 |
"call for the case where the I<mask> size specified in I<cpusetsize> is " |
| 503 |
"smaller than the size of the affinity mask used by the kernel. (Depending " |
| 504 |
"on the system CPU topology, the kernel affinity mask can be substantially " |
| 505 |
"larger than the number of active CPUs in the system.)" |
| 506 |
msgstr "" |
| 507 |
"تفشل بالخطأ B<EINVAL>، وهو الخطأ الناتج عن استدعاء النظام الأساسي في الحالة " |
| 508 |
"التي يكون فيها حجم I<mask> المحدد في I<cpusetsize> أصغر من حجم قناع التقارب " |
| 509 |
"المستخدم بواسطة النواة. (اعتمادًا على مخطط وحدة المعالجة المركزية للنظام، " |
| 510 |
"يمكن أن يكون قناع تقارب النواة أكبر بكثير من عدد وحدات المعالجة المركزية " |
| 511 |
"النشطة في النظام)." |
| 512 |
|
| 513 |
# This paragraph does not build, please check |
| 514 |
#. type: Plain text |
| 515 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 516 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 517 |
msgid "" |
| 518 |
"When working on systems with large kernel CPU affinity masks, one must " |
| 519 |
"dynamically allocate the I<mask> argument (see B<CPU_ALLOC>(3)). Currently, " |
| 520 |
"the only way to do this is by probing for the size of the required mask " |
| 521 |
"using B<sched_getaffinity>() calls with increasing mask sizes (until the " |
| 522 |
"call does not fail with the error B<EINVAL>)." |
| 523 |
msgstr "" |
| 524 |
"عند العمل على أنظمة ذات أقنعة تقارب كبيرة لنواة وحدة المعالجة المركزية، يجب " |
| 525 |
"تخصيص الوسيط I<mask> ديناميكيًا (انظر B<CPU_ALLOC>(3)). حاليًا، الطريقة " |
| 526 |
"الوحيدة للقيام بذلك هي من خلال استقصاء حجم القناع المطلوب باستخدام استدعاءات " |
| 527 |
"B<sched_getaffinity>() بأحجام أقنعة متزايدة (حتى لا يفشل الاستدعاء بالخطأ " |
| 528 |
"B<EINVAL>)." |
| 529 |
|
| 530 |
#. type: Plain text |
| 531 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 532 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 533 |
msgid "" |
| 534 |
"Be aware that B<CPU_ALLOC>(3) may allocate a slightly larger CPU set than " |
| 535 |
"requested (because CPU sets are implemented as bit masks allocated in units " |
| 536 |
"of I<sizeof(long)>). Consequently, B<sched_getaffinity>() can set bits " |
| 537 |
"beyond the requested allocation size, because the kernel sees a few " |
| 538 |
"additional bits. Therefore, the caller should iterate over the bits in the " |
| 539 |
"returned set, counting those which are set, and stop upon reaching the value " |
| 540 |
"returned by B<CPU_COUNT>(3) (rather than iterating over the number of bits " |
| 541 |
"requested to be allocated)." |
| 542 |
msgstr "" |
| 543 |
"كن على علم بأن B<CPU_ALLOC>(3) قد يخصص مجموعة وحدات معالجة مركزية أكبر قليلاً " |
| 544 |
"مما هو مطلوب (لأن مجموعات وحدات المعالجة المركزية تُنفذ كأقنعة بتات تُخصص " |
| 545 |
"بوحدات I<sizeof(long)>). بناءً على ذلك، يمكن لـ B<sched_getaffinity>() ضبط " |
| 546 |
"بتات تتجاوز حجم التخصيص المطلوب، لأن النواة ترى بضع بتات إضافية. لذلك، يجب " |
| 547 |
"على المستدعِي تكرار البتات في المجموعة المُعادة، وعدّ البتات التي ضُبطت، والتوقف " |
| 548 |
"عند الوصول إلى القيمة المُعادة من B<CPU_COUNT>(3) (بدلاً من التكرار على عدد " |
| 549 |
"البتات المطلوب تخصيصها)." |
| 550 |
|
| 551 |
#. type: SH |
| 552 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 553 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 554 |
#, no-wrap |
| 555 |
msgid "EXAMPLES" |
| 556 |
msgstr "أمثلة" |
| 557 |
|
| 558 |
#. type: Plain text |
| 559 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 560 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 561 |
msgid "" |
| 562 |
"The program below creates a child process. The parent and child then each " |
| 563 |
"assign themselves to a specified CPU and execute identical loops that " |
| 564 |
"consume some CPU time. Before terminating, the parent waits for the child " |
| 565 |
"to complete. The program takes three command-line arguments: the CPU number " |
| 566 |
"for the parent, the CPU number for the child, and the number of loop " |
| 567 |
"iterations that both processes should perform." |
| 568 |
msgstr "" |
| 569 |
"يُنشئ البرنامج أدناه عملية طفل. ثم تخصص كل من العملية الأب والطفل نفسيهما " |
| 570 |
"لوحدة معالجة مركزية محددة وينفذان حلقات متطابقة تستهلك بعض وقت وحدة المعالجة " |
| 571 |
"المركزية. قبل الإنهاء، ينتظر الأب اكتمال الطفل. يأخذ البرنامج ثلاثة وسائط " |
| 572 |
"لسطر الأوامر: رقم وحدة المعالجة المركزية للأب، ورقم وحدة المعالجة المركزية " |
| 573 |
"للطفل، وعدد تكرارات الحلقة التي يجب أن تؤديها كلتا العمليتين." |
| 574 |
|
| 575 |
#. type: Plain text |
| 576 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 577 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 578 |
msgid "" |
| 579 |
"As the sample runs below demonstrate, the amount of real and CPU time " |
| 580 |
"consumed when running the program will depend on intra-core caching effects " |
| 581 |
"and whether the processes are using the same CPU." |
| 582 |
msgstr "" |
| 583 |
"كما توضح العينات التي تعمل أدناه، فإن مقدار الوقت الحقيقي ووقت وحدة المعالجة " |
| 584 |
"المركزية المستهلك عند تشغيل البرنامج سيعتمد على تأثيرات الخبيئة داخل النواة " |
| 585 |
"وما إذا كانت العمليات تستخدم نفس وحدة المعالجة المركزية." |
| 586 |
|
| 587 |
#. type: Plain text |
| 588 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 589 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 590 |
msgid "" |
| 591 |
"We first employ B<lscpu>(1) to determine that this (x86) system has two " |
| 592 |
"cores, each with two CPUs:" |
| 593 |
msgstr "" |
| 594 |
"نستخدم أولاً B<lscpu>(1) لتحديد أن هذا الحاسوب (x86) يحتوي على نواتين، لكل " |
| 595 |
"منهما وحدتا معالجة مركزية:" |
| 596 |
|
| 597 |
#. type: Plain text |
| 598 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 599 |
#: opensuse-tumbleweed |
| 600 |
#, no-wrap |
| 601 |
msgid "" |
| 602 |
"$B< lscpu | egrep -i \\[aq]core.*:|socket\\[aq]>;\n" |
| 603 |
"Thread(s) per core: 2\n" |
| 604 |
"Core(s) per socket: 2\n" |
| 605 |
"Socket(s): 1\n" |
| 606 |
msgstr "" |
| 607 |
"$B< lscpu | egrep -i \\[aq]core.*:|socket\\[aq]>;\n" |
| 608 |
"Thread(s) per core: 2\n" |
| 609 |
"Core(s) per socket: 2\n" |
| 610 |
"Socket(s): 1\n" |
| 611 |
|
| 612 |
#. type: Plain text |
| 613 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 614 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 615 |
msgid "" |
| 616 |
"We then time the operation of the example program for three cases: both " |
| 617 |
"processes running on the same CPU; both processes running on different CPUs " |
| 618 |
"on the same core; and both processes running on different CPUs on different " |
| 619 |
"cores." |
| 620 |
msgstr "" |
| 621 |
"نقيس بعد ذلك زمن تشغيل البرنامج المثال لثلاث حالات: كلتا العمليتين تعملان " |
| 622 |
"على نفس وحدة المعالجة المركزية؛ كلتا العمليتين تعملان على وحدتي معالجة " |
| 623 |
"مركزية مختلفتين على نفس النواة؛ وكلتا العمليتين تعملان على وحدتي معالجة " |
| 624 |
"مركزية مختلفتين على نواتين مختلفتين." |
| 625 |
|
| 626 |
#. type: Plain text |
| 627 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 628 |
#: opensuse-tumbleweed |
| 629 |
#, no-wrap |
| 630 |
msgid "" |
| 631 |
"$B< time -p ./a.out 0 0 100000000>;\n" |
| 632 |
"real 14.75\n" |
| 633 |
"user 3.02\n" |
| 634 |
"sys 11.73\n" |
| 635 |
"$B< time -p ./a.out 0 1 100000000>;\n" |
| 636 |
"real 11.52\n" |
| 637 |
"user 3.98\n" |
| 638 |
"sys 19.06\n" |
| 639 |
"$B< time -p ./a.out 0 3 100000000>;\n" |
| 640 |
"real 7.89\n" |
| 641 |
"user 3.29\n" |
| 642 |
"sys 12.07\n" |
| 643 |
msgstr "" |
| 644 |
"$B< time -p ./a.out 0 0 100000000>;\n" |
| 645 |
"real 14.75\n" |
| 646 |
"user 3.02\n" |
| 647 |
"sys 11.73\n" |
| 648 |
"$B< time -p ./a.out 0 1 100000000>;\n" |
| 649 |
"real 11.52\n" |
| 650 |
"user 3.98\n" |
| 651 |
"sys 19.06\n" |
| 652 |
"$B< time -p ./a.out 0 3 100000000>;\n" |
| 653 |
"real 7.89\n" |
| 654 |
"user 3.29\n" |
| 655 |
"sys 12.07\n" |
| 656 |
|
| 657 |
#. type: SS |
| 658 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 659 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 660 |
#, no-wrap |
| 661 |
msgid "Program source" |
| 662 |
msgstr "مصدر البرنامج" |
| 663 |
|
| 664 |
#. type: Plain text |
| 665 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 666 |
#: opensuse-tumbleweed |
| 667 |
#, no-wrap |
| 668 |
msgid "" |
| 669 |
"#define _GNU_SOURCE\n" |
| 670 |
"#include E<lt>err.hE<gt>\n" |
| 671 |
"#include E<lt>sched.hE<gt>\n" |
| 672 |
"#include E<lt>stdio.hE<gt>\n" |
| 673 |
"#include E<lt>stdlib.hE<gt>\n" |
| 674 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 675 |
"#include E<lt>unistd.hE<gt>\n" |
| 676 |
"\\&\n" |
| 677 |
"int\n" |
| 678 |
"main(int argc, char *argv[])\n" |
| 679 |
"{\n" |
| 680 |
" int parentCPU, childCPU;\n" |
| 681 |
" cpu_set_t set;\n" |
| 682 |
" unsigned int nloops;\n" |
| 683 |
"\\&\n" |
| 684 |
" if (argc != 4) {\n" |
| 685 |
" fprintf(stderr, \"Usage: %s parent-cpu child-cpu num-loops\\[rs]n\",\n" |
| 686 |
" argv[0]);\n" |
| 687 |
" exit(EXIT_FAILURE);\n" |
| 688 |
" }\n" |
| 689 |
"\\&\n" |
| 690 |
" parentCPU = atoi(argv[1]);\n" |
| 691 |
" childCPU = atoi(argv[2]);\n" |
| 692 |
" nloops = atoi(argv[3]);\n" |
| 693 |
"\\&\n" |
| 694 |
" CPU_ZERO(&set);\n" |
| 695 |
"\\&\n" |
| 696 |
" switch (fork()) {\n" |
| 697 |
" case -1: /* Error */\n" |
| 698 |
" err(EXIT_FAILURE, \"fork\");\n" |
| 699 |
"\\&\n" |
| 700 |
" case 0: /* Child */\n" |
| 701 |
" CPU_SET(childCPU, &set);\n" |
| 702 |
"\\&\n" |
| 703 |
" if (sched_setaffinity(0, sizeof(set), &set) == -1)\n" |
| 704 |
" err(EXIT_FAILURE, \"sched_setaffinity\");\n" |
| 705 |
"\\&\n" |
| 706 |
" for (unsigned int j = 0; j E<lt> nloops; j++)\n" |
| 707 |
" getppid();\n" |
| 708 |
"\\&\n" |
| 709 |
" exit(EXIT_SUCCESS);\n" |
| 710 |
"\\&\n" |
| 711 |
" default: /* Parent */\n" |
| 712 |
" CPU_SET(parentCPU, &set);\n" |
| 713 |
"\\&\n" |
| 714 |
" if (sched_setaffinity(0, sizeof(set), &set) == -1)\n" |
| 715 |
" err(EXIT_FAILURE, \"sched_setaffinity\");\n" |
| 716 |
"\\&\n" |
| 717 |
" for (unsigned int j = 0; j E<lt> nloops; j++)\n" |
| 718 |
" getppid();\n" |
| 719 |
"\\&\n" |
| 720 |
" wait(NULL); /* Wait for child to terminate */\n" |
| 721 |
" exit(EXIT_SUCCESS);\n" |
| 722 |
" }\n" |
| 723 |
"}\n" |
| 724 |
msgstr "" |
| 725 |
"#define _GNU_SOURCE\n" |
| 726 |
"#include E<lt>err.hE<gt>\n" |
| 727 |
"#include E<lt>sched.hE<gt>\n" |
| 728 |
"#include E<lt>stdio.hE<gt>\n" |
| 729 |
"#include E<lt>stdlib.hE<gt>\n" |
| 730 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 731 |
"#include E<lt>unistd.hE<gt>\n" |
| 732 |
"\\&\n" |
| 733 |
"int\n" |
| 734 |
"main(int argc, char *argv[])\n" |
| 735 |
"{\n" |
| 736 |
" int parentCPU, childCPU;\n" |
| 737 |
" cpu_set_t set;\n" |
| 738 |
" unsigned int nloops;\n" |
| 739 |
"\\&\n" |
| 740 |
" if (argc != 4) {\n" |
| 741 |
" fprintf(stderr, \"Usage: %s parent-cpu child-cpu num-loops\\[rs]n\",\n" |
| 742 |
" argv[0]);\n" |
| 743 |
" exit(EXIT_FAILURE);\n" |
| 744 |
" }\n" |
| 745 |
"\\&\n" |
| 746 |
" parentCPU = atoi(argv[1]);\n" |
| 747 |
" childCPU = atoi(argv[2]);\n" |
| 748 |
" nloops = atoi(argv[3]);\n" |
| 749 |
"\\&\n" |
| 750 |
" CPU_ZERO(&set);\n" |
| 751 |
"\\&\n" |
| 752 |
" switch (fork()) {\n" |
| 753 |
" case -1: /* خطأ */\n" |
| 754 |
" err(EXIT_FAILURE, \"fork\");\n" |
| 755 |
"\\&\n" |
| 756 |
" case 0: /* طفل */\n" |
| 757 |
" CPU_SET(childCPU, &set);\n" |
| 758 |
"\\&\n" |
| 759 |
" if (sched_setaffinity(0, sizeof(set), &set) == -1)\n" |
| 760 |
" err(EXIT_FAILURE, \"sched_setaffinity\");\n" |
| 761 |
"\\&\n" |
| 762 |
" for (unsigned int j = 0; j E<lt> nloops; j++)\n" |
| 763 |
" getppid();\n" |
| 764 |
"\\&\n" |
| 765 |
" exit(EXIT_SUCCESS);\n" |
| 766 |
"\\&\n" |
| 767 |
" default: /* أب */\n" |
| 768 |
" CPU_SET(parentCPU, &set);\n" |
| 769 |
"\\&\n" |
| 770 |
" if (sched_setaffinity(0, sizeof(set), &set) == -1)\n" |
| 771 |
" err(EXIT_FAILURE, \"sched_setaffinity\");\n" |
| 772 |
"\\&\n" |
| 773 |
" for (unsigned int j = 0; j E<lt> nloops; j++)\n" |
| 774 |
" getppid();\n" |
| 775 |
"\\&\n" |
| 776 |
" wait(NULL); /* انتظر إنهاء الطفل */\n" |
| 777 |
" exit(EXIT_SUCCESS);\n" |
| 778 |
" }\n" |
| 779 |
"}\n" |
| 780 |
|
| 781 |
#. SRC END |
| 782 |
#. type: SH |
| 783 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 784 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 785 |
#, no-wrap |
| 786 |
msgid "SEE ALSO" |
| 787 |
msgstr "انظر أيضًا" |
| 788 |
|
| 789 |
#. type: Plain text |
| 790 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 791 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 792 |
msgid "" |
| 793 |
"B<lscpu>(1), B<nproc>(1), B<taskset>(1), B<clone>(2), B<getcpu>(2), " |
| 794 |
"B<getpriority>(2), B<gettid>(2), B<nice>(2), B<sched_get_priority_max>(2), " |
| 795 |
"B<sched_get_priority_min>(2), B<sched_getscheduler>(2), " |
| 796 |
"B<sched_setscheduler>(2), B<setpriority>(2), B<CPU_SET>(3), " |
| 797 |
"B<get_nprocs>(3), B<pthread_setaffinity_np>(3), B<sched_getcpu>(3), " |
| 798 |
"B<capabilities>(7), B<cpuset>(7), B<sched>(7), B<numactl>(8)" |
| 799 |
msgstr "" |
| 800 |
"B<lscpu>(1), B<nproc>(1), B<taskset>(1), B<clone>(2), B<getcpu>(2), " |
| 801 |
"B<getpriority>(2), B<gettid>(2), B<nice>(2), B<sched_get_priority_max>(2), " |
| 802 |
"B<sched_get_priority_min>(2), B<sched_getscheduler>(2), " |
| 803 |
"B<sched_setscheduler>(2), B<setpriority>(2), B<CPU_SET>(3), " |
| 804 |
"B<get_nprocs>(3), B<pthread_setaffinity_np>(3), B<sched_getcpu>(3), " |
| 805 |
"B<capabilities>(7), B<cpuset>(7), B<sched>(7), B<numactl>(8)" |
| 806 |
|
| 807 |
#. type: TH |
| 808 |
#: debian-trixie |
| 809 |
#, no-wrap |
| 810 |
msgid "2024-06-15" |
| 811 |
msgstr "15 يونيو 2024" |
| 812 |
|
| 813 |
#. type: TH |
| 814 |
#: debian-trixie |
| 815 |
#, no-wrap |
| 816 |
msgid "Linux man-pages 6.9.1" |
| 817 |
msgstr "صفحات دليل لينكس 6.9.1" |
| 818 |
|
| 819 |
#. type: Plain text |
| 820 |
#: debian-trixie |
| 821 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 822 |
msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)" |
| 823 |
|
| 824 |
#. type: Plain text |
| 825 |
#: debian-trixie fedora-44 fedora-rawhide |
| 826 |
#, no-wrap |
| 827 |
msgid "" |
| 828 |
"$ B<lscpu | egrep -i \\[aq]core.*:|socket\\[aq]>\n" |
| 829 |
"Thread(s) per core: 2\n" |
| 830 |
"Core(s) per socket: 2\n" |
| 831 |
"Socket(s): 1\n" |
| 832 |
msgstr "" |
| 833 |
"$ B<lscpu | egrep -i \\[aq]core.*:|socket\\[aq]>\n" |
| 834 |
"Thread(s) per core: 2\n" |
| 835 |
"Core(s) per socket: 2\n" |
| 836 |
"Socket(s): 1\n" |
| 837 |
|
| 838 |
#. type: Plain text |
| 839 |
#: debian-trixie fedora-44 fedora-rawhide |
| 840 |
#, no-wrap |
| 841 |
msgid "" |
| 842 |
"$ B<time -p ./a.out 0 0 100000000>\n" |
| 843 |
"real 14.75\n" |
| 844 |
"user 3.02\n" |
| 845 |
"sys 11.73\n" |
| 846 |
"$ B<time -p ./a.out 0 1 100000000>\n" |
| 847 |
"real 11.52\n" |
| 848 |
"user 3.98\n" |
| 849 |
"sys 19.06\n" |
| 850 |
"$ B<time -p ./a.out 0 3 100000000>\n" |
| 851 |
"real 7.89\n" |
| 852 |
"user 3.29\n" |
| 853 |
"sys 12.07\n" |
| 854 |
msgstr "" |
| 855 |
"$ B<time -p ./a.out 0 0 100000000>\n" |
| 856 |
"real 14.75\n" |
| 857 |
"user 3.02\n" |
| 858 |
"sys 11.73\n" |
| 859 |
"$ B<time -p ./a.out 0 1 100000000>\n" |
| 860 |
"real 11.52\n" |
| 861 |
"user 3.98\n" |
| 862 |
"sys 19.06\n" |
| 863 |
"$ B<time -p ./a.out 0 3 100000000>\n" |
| 864 |
"real 7.89\n" |
| 865 |
"user 3.29\n" |
| 866 |
"sys 12.07\n" |
| 867 |
|
| 868 |
#. type: Plain text |
| 869 |
#: debian-trixie fedora-44 fedora-rawhide |
| 870 |
#, no-wrap |
| 871 |
msgid "" |
| 872 |
"#define _GNU_SOURCE\n" |
| 873 |
"#include E<lt>err.hE<gt>\n" |
| 874 |
"#include E<lt>sched.hE<gt>\n" |
| 875 |
"#include E<lt>stdio.hE<gt>\n" |
| 876 |
"#include E<lt>stdlib.hE<gt>\n" |
| 877 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 878 |
"#include E<lt>unistd.hE<gt>\n" |
| 879 |
"\\&\n" |
| 880 |
"int\n" |
| 881 |
"main(int argc, char *argv[])\n" |
| 882 |
"{\n" |
| 883 |
" int parentCPU, childCPU;\n" |
| 884 |
" cpu_set_t set;\n" |
| 885 |
" unsigned int nloops;\n" |
| 886 |
"\\&\n" |
| 887 |
" if (argc != 4) {\n" |
| 888 |
" fprintf(stderr, \"Usage: %s parent-cpu child-cpu num-loops\\[rs]n\",\n" |
| 889 |
" argv[0]);\n" |
| 890 |
" exit(EXIT_FAILURE);\n" |
| 891 |
" }\n" |
| 892 |
"\\&\n" |
| 893 |
" parentCPU = atoi(argv[1]);\n" |
| 894 |
" childCPU = atoi(argv[2]);\n" |
| 895 |
" nloops = atoi(argv[3]);\n" |
| 896 |
"\\&\n" |
| 897 |
" CPU_ZERO(&set);\n" |
| 898 |
"\\&\n" |
| 899 |
" switch (fork()) {\n" |
| 900 |
" case -1: /* Error */\n" |
| 901 |
" err(EXIT_FAILURE, \"fork\");\n" |
| 902 |
"\\&\n" |
| 903 |
" case 0: /* Child */\n" |
| 904 |
" CPU_SET(childCPU, &set);\n" |
| 905 |
"\\&\n" |
| 906 |
" if (sched_setaffinity(getpid(), sizeof(set), &set) == -1)\n" |
| 907 |
" err(EXIT_FAILURE, \"sched_setaffinity\");\n" |
| 908 |
"\\&\n" |
| 909 |
" for (unsigned int j = 0; j E<lt> nloops; j++)\n" |
| 910 |
" getppid();\n" |
| 911 |
"\\&\n" |
| 912 |
" exit(EXIT_SUCCESS);\n" |
| 913 |
"\\&\n" |
| 914 |
" default: /* Parent */\n" |
| 915 |
" CPU_SET(parentCPU, &set);\n" |
| 916 |
"\\&\n" |
| 917 |
" if (sched_setaffinity(getpid(), sizeof(set), &set) == -1)\n" |
| 918 |
" err(EXIT_FAILURE, \"sched_setaffinity\");\n" |
| 919 |
"\\&\n" |
| 920 |
" for (unsigned int j = 0; j E<lt> nloops; j++)\n" |
| 921 |
" getppid();\n" |
| 922 |
"\\&\n" |
| 923 |
" wait(NULL); /* Wait for child to terminate */\n" |
| 924 |
" exit(EXIT_SUCCESS);\n" |
| 925 |
" }\n" |
| 926 |
"}\n" |
| 927 |
msgstr "" |
| 928 |
"#define _GNU_SOURCE\n" |
| 929 |
"#include E<lt>err.hE<gt>\n" |
| 930 |
"#include E<lt>sched.hE<gt>\n" |
| 931 |
"#include E<lt>stdio.hE<gt>\n" |
| 932 |
"#include E<lt>stdlib.hE<gt>\n" |
| 933 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 934 |
"#include E<lt>unistd.hE<gt>\n" |
| 935 |
"\\&\n" |
| 936 |
"int\n" |
| 937 |
"main(int argc, char *argv[])\n" |
| 938 |
"{\n" |
| 939 |
" int parentCPU, childCPU;\n" |
| 940 |
" cpu_set_t set;\n" |
| 941 |
" unsigned int nloops;\n" |
| 942 |
"\\&\n" |
| 943 |
" if (argc != 4) {\n" |
| 944 |
" fprintf(stderr, \"Usage: %s parent-cpu child-cpu num-loops\\[rs]n\",\n" |
| 945 |
" argv[0]);\n" |
| 946 |
" exit(EXIT_FAILURE);\n" |
| 947 |
" }\n" |
| 948 |
"\\&\n" |
| 949 |
" parentCPU = atoi(argv[1]);\n" |
| 950 |
" childCPU = atoi(argv[2]);\n" |
| 951 |
" nloops = atoi(argv[3]);\n" |
| 952 |
"\\&\n" |
| 953 |
" CPU_ZERO(&set);\n" |
| 954 |
"\\&\n" |
| 955 |
" switch (fork()) {\n" |
| 956 |
" case -1: /* خطأ */\n" |
| 957 |
" err(EXIT_FAILURE, \"fork\");\n" |
| 958 |
"\\&\n" |
| 959 |
" case 0: /* طفل */\n" |
| 960 |
" CPU_SET(childCPU, &set);\n" |
| 961 |
"\\&\n" |
| 962 |
" if (sched_setaffinity(getpid(), sizeof(set), &set) == -1)\n" |
| 963 |
" err(EXIT_FAILURE, \"sched_setaffinity\");\n" |
| 964 |
"\\&\n" |
| 965 |
" for (unsigned int j = 0; j E<lt> nloops; j++)\n" |
| 966 |
" getppid();\n" |
| 967 |
"\\&\n" |
| 968 |
" exit(EXIT_SUCCESS);\n" |
| 969 |
"\\&\n" |
| 970 |
" default: /* أب */\n" |
| 971 |
" CPU_SET(parentCPU, &set);\n" |
| 972 |
"\\&\n" |
| 973 |
" if (sched_setaffinity(getpid(), sizeof(set), &set) == -1)\n" |
| 974 |
" err(EXIT_FAILURE, \"sched_setaffinity\");\n" |
| 975 |
"\\&\n" |
| 976 |
" for (unsigned int j = 0; j E<lt> nloops; j++)\n" |
| 977 |
" getppid();\n" |
| 978 |
"\\&\n" |
| 979 |
" wait(NULL); /* انتظر إنهاء الطفل */\n" |
| 980 |
" exit(EXIT_SUCCESS);\n" |
| 981 |
" }\n" |
| 982 |
"}\n" |
| 983 |
|
| 984 |
#. type: TH |
| 985 |
#: fedora-44 fedora-rawhide |
| 986 |
#, no-wrap |
| 987 |
msgid "2024-07-23" |
| 988 |
msgstr "23 يوليو 2024" |
| 989 |
|
| 990 |
#. type: TH |
| 991 |
#: fedora-44 fedora-rawhide |
| 992 |
#, no-wrap |
| 993 |
msgid "Linux man-pages 6.13" |
| 994 |
msgstr "صفحات دليل لينكس 6.13" |
| 995 |
|
| 996 |
#. type: TH |
| 997 |
#: mageia-cauldron |
| 998 |
#, no-wrap |
| 999 |
msgid "Linux man-pages 6.17" |
| 1000 |
msgstr "صفحات دليل لينكس 6.17" |
| 1001 |
|
| 1002 |
#. type: TH |
| 1003 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1004 |
#, no-wrap |
| 1005 |
msgid "Linux man-pages (unreleased)" |
| 1006 |
msgstr "صفحات دليل لينكس (لم تصدر بعد)" |