flat assembler
Message board for the users of flat assembler.

Index > Windows > Fibers

Author
Thread Post new topic Reply to topic
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Have any of you ever used them (or emulated them with Assembly)? Do you know of any program making use of them?
Post 13 Jul 2011, 15:41
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
It's the first time a hear of them. Never used, never saw.
Seems like a Windows "exotic" api.
Post 13 Jul 2011, 15:51
View user's profile Send private message Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 822
Location: Jakarta, Indonesia
TmX
Post 13 Jul 2011, 15:53
View user's profile Send private message Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22
Fibers are an extra layer of abstraction/overhead on top of multi-threading.
http://msdn.microsoft.com/en-us/library/ms686919%28v=vs.85%29.aspx

Since they are not optimal, there's no reason to use them in with ASM (assuming you use ASM for speed/size optimization).

I've never seen them used, but I'd guess there's some cross-platform threading library that works POSIX *nix and WIN32, which makes use of the fibers api.
Post 13 Jul 2011, 16:01
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 619
cod3b453
I use them at work as part of the hardware simulator I help to write/maintain. The entire system models hardware as (very many) virtual threads using a cross-platform library that uses fibers and whatever the unix equivalent is. This has some useful properties, as only one thread is actually executing so the need for thread safety is reduced and it allows for easier debugging because everything is serialised. (also tracking the state of 100's of threads simultaneously is not practical Laughing)
Post 13 Jul 2011, 19:37
View user's profile Send private message Reply with quote
dancho



Joined: 06 Mar 2011
Posts: 74
dancho
I read about fibers first time in this book ( great one btw , recommend to read to all win developers )

http://www.amazon.com/Programming-Applications-Microsoft-Windows/dp/1572319968

Chapter 12 is about them ( not to much text ),
with small example program in C++,
though didnt used myself , so cant help you ...
Post 13 Jul 2011, 19:48
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
LocoDelAssembly wrote:
Have any of you ever used them (or emulated them with Assembly)? Do you know of any program making use of them?


http://msdn.microsoft.com/en-us/library/ms682661.aspx
Post 13 Jul 2011, 20:09
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen
The Old New Thing has nice article(s) about fibers.
Post 14 Jul 2011, 07:03
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Thanks for your answers. I've just found something I didn't know about: User-Mode Scheduling. The minimum requirements are a little bit aggressive though... UMS is probably more heavier than fibers but at least you'll have far less problems with code assuming they run on actual separate threads and if you get blocked the system will call you back so you can pick a new UMS thread (with fibers you were forced to avoid this situation and perhaps it is not always feasible to do)
Post 14 Jul 2011, 14:43
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Iirc MS SQL Server can run in some fiber mode, but other than that? Haven't bumped into software using fibers (that I know of, anyway).
Post 14 Jul 2011, 18:45
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.