From: cornet <cornet@zmail.ru> To: mandrake-russian@linuxteam.iplabs.ru Subject: Re: [mdk-re] Процессы Date: Mon Jan 29 12:22:00 2001 Message-ID: <3A753624.AE284BB0@zmail.ru> (raw) In-Reply-To: <OFF537AECD.C44AADBB-ONC62569E3.002F01E3@novosoft.ru> denf@novosoft.ru wrote: > Все просто: постоянное увеличение на 1 - это самый быстрый способ > выделения свободных pid (если не поддерживать список свободных: конечно), > когда дойдет до самого большого, начнет с начала, причем, большинство из > начальных процессов уже умерли и выделение опять будет быстрым. Hello!! Я правильно понял, что когда зашкалило число процессов, то работает алгоритм типа: last_enabled_pid=1; # вызывается только при зашкаливании for (n=last_enabled_pid+1; n<=max_pid; n++) { if (n != занято_активным_процессом) exit; # если большинство древних процессов уже ушли то скорее всего сразу же будет exit. } new_pid = n; last_enabled_pid=n; # используется при следующих вызовах for В сильно упрощенном варианте верно? > 1╘щ╜╘\x1e╝К,┴╘Фj)b· b╡с\x1a²зз▒ЙН╡х ·X╖╩^[^jh╘∙╕Л╝Хm╤÷Ъ√)Нфв *ei╩+╩Ы ┼Y ÷Ыb╡ь╖~▐ФjwkjG╚╨к"an== -- ******** FIRE & STEEL ********
prev parent reply other threads:[~2001-01-29 12:22 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-01-29 11:34 denf 2001-01-29 12:22 ` cornet [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=3A753624.AE284BB0@zmail.ru \ --to=cornet@zmail.ru \ --cc=mandrake-russian@linuxteam.iplabs.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git