ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: "Boronin Sergey" <analisys@quality.s2.ru>
To: "'ALT Linux Sisyphus discussion list'" <sisyphus@altlinux.ru>
Subject: RE: [sisyphus] Re:Как ускорить работу с потоками?
Date: Fri, 10 Sep 2004 16:03:49 +0400
Message-ID: <013701c4972e$3c546470$4d0010ac@aprcity.com> (raw)
In-Reply-To: <20040910025455.GF16262@workstation>

> epoll, например :)
> 
> select/poll на худой конец.
> 
> kevent в FreeBSD.
>

А можно в двух словах о концепциях, которые лежат в основе этих
технологий, т.е. на чем основана их работа и как реализуется
параллельность выполнения?

Если с помощью fork() то это медленнее, а пулл процессов будет отъедать
немало оперативки (гораздо больше чем потоки в процессах).

Кроме того, потоки удобны тем, что используют единое адресное
пространство,
Что требует конечно известной аккуратности и внимательности, но и
позволяет сделать код проще, логику его работы прозрачнее, да и памяти
по сравнению с fork() ест не в пример меньше.

С уважением,
Боронин Сергей

> -----Original Message-----
> From: sisyphus-bounces@altlinux.ru
[mailto:sisyphus-bounces@altlinux.ru]
> On Behalf Of Денис Смирнов
> Sent: Friday, September 10, 2004 6:55 AM
> To: Serge Pavlovsky
> Cc: ALT Linux Sisyphus discussion list
> Subject: [sisyphus] Re:Как ускорить работу с потоками?
> 
> On Fri, Sep 10, 2004 at 02:51:00AM +0300, Serge Pavlovsky wrote:
> 
>  >> Если вы приведёте пример, когда на x86 100 тысяч тредов являются
>  >> оптимальным решением, я буду вам очень благодарен.
>  SP> если они все спят в чтении из сокетов
>  SP> можете приводить пример грузовика ;)
> 
> epoll, например :)
> 
> select/poll на худой конец.
> 
> kevent в FreeBSD.
> 
> aio.
> 
> Самое разумное -- выносить в отдельные нити _обработку_, а как раз
ждать и
> данными кидаться в небольшом количестве нитей (в несколько раз больше
чем
> количество процессорв, для большей равномерности).
> 
> --
> С уважением, Денис
> 
> http://freesource.info
> 
> _______________________________________________
> Sisyphus mailing list
> Sisyphus@altlinux.ru
> https://lists.altlinux.ru/mailman/listinfo/sisyphus

  reply	other threads:[~2004-09-10 12:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-30 11:29 [sisyphus] Как " Boronin Sergey
2004-08-30 11:36 ` Serge Ryabchun
2004-08-30 17:06 ` Gleb Kulikov
2004-08-31  7:32   ` Boronin Sergey
2004-08-31  7:44     ` Sviataslau Svirydau
2004-08-31  8:51       ` Boronin Sergey
2004-08-31  7:58     ` Boronin Sergey
2004-08-31  9:40       ` Dmitry V. Levin
2004-08-31 10:35         ` Boronin Sergey
2004-09-07 13:43     ` Vadim Gorodisky
2004-09-07 14:02       ` Boronin Sergey
2004-09-07 14:25       ` Ildar Mulyukov
2004-09-07 15:37         ` Boronin Sergey
2004-09-07 17:36           ` Денис Смирнов
2004-09-08 12:20               ` Denis Smirnov
2004-09-09  6:09             ` Serge Pavlovsky
2004-09-09 19:07               ` [sisyphus] " Денис Смирнов
2004-09-09 23:51                 ` Serge Pavlovsky
2004-09-10  2:54                   ` Денис Смирнов
2004-09-10 12:03                     ` Boronin Sergey [this message]
2004-09-10 14:07                       ` [sisyphus] " Денис Смирнов
2004-09-10 17:21                     ` [sisyphus] Re: Как " Serge Pavlovsky
2004-09-10 21:32                       ` Денис Смирнов
2004-09-11 15:20                         ` Michael Shigorin
2004-09-12 20:20                           ` Денис Смирнов
2004-09-14 18:46                             ` Michael Shigorin
2004-09-14 20:12                               ` Denis Smirnov
2004-09-13  0:19                         ` Serge Pavlovsky
2004-09-13 20:02                           ` Денис Смирнов
2004-09-14  0:04                             ` Serge Pavlovsky
2004-09-15 21:03                               ` Денис Смирнов
2004-09-17 14:20                                 ` Serge Pavlovsky
2004-09-10 10:50                 ` [sisyphus] " Boronin Sergey
2004-09-10 14:01                   ` Денис Смирнов

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='013701c4972e$3c546470$4d0010ac@aprcity.com' \
    --to=analisys@quality.s2.ru \
    --cc=sisyphus@altlinux.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 Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git