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