Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
saman_b
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
saman_b
7y ago
I believe one should not confine event-driven only to applications that don't do synchronisation, that's part of the misconception that leads to thinking event-driven has higher performance. This is due to the fact that part of th
2.
▲
by
saman_b
7y ago
The results of our to be published paper clearly confirm the claims of this paper and shows that if implemented well, threads can perform and scale as good as events with not much memory overhead. I worked on this subject during my Phd, and
3.
▲
by
saman_b
10y ago
I think it was the "flash boys" by Michael Lewis, that mentioned a Russian programmer that was very good at programming with pen and paper, and the reason was in old days there were not many computers around or you had to use punc
4.
▲
by
saman_b
10y ago
Since IO Multiplexing in go is based on Edge-triggered epoll, you always need to do a write/read syscall (it happens underneath) before blocking the goroutine to arm the epoll to poll that specific FD. Also this approach relies on park
5.
▲
Generate C interface from C++ source code using Clang libtooling
(samanbarghi.com)
39 points
by
saman_b
10y ago
|
0 comments
6.
▲
by
saman_b
10y ago
> I was also assuming a single kernel thread performs I/O via epoll/kqueue/etc. and either has its own queue from which other threads steal, or simply pushes results onto a random queue when requested I/O are complete
7.
▲
by
saman_b
10y ago
Thanks, so much information to absorb, let me go through all this and get back to you. I shoot you an email when I processed all this :)
8.
▲
by
saman_b
10y ago
I am not sure if you are referring to the runQueue being used in Linux or the whole approach. I try to answer both: Run queues can be part of any scheduler, they are queues with runnable tasks. But as why the approach is worth while in user
9.
▲
by
saman_b
10y ago
Well on the surface, yes! when I started I expected the same. For now there is no work stealing among kThreads. But let me dig into the problem a bit deeper so you get an idea why it might not be very straight forward (also it very much dep
10.
▲
by
saman_b
10y ago
Thanks for mentioning this, it is indeed very related and very interesting. I am not sure why not me or people around me were aware of Qthread, it has very good support for various architectures and provides many interesting features. It h
11.
▲
by
saman_b
10y ago
Seems like a very mature library, I can't answer your question before I go through their documentation and code. Also, I find your question a bit abstract, since I am not aware of the details of the problem you are trying to solve, I c
12.
▲
by
saman_b
10y ago
I have seen this before. Those are very good points, and I am trying to move this library towards supporting a SEDA type architecture with dynamic control and auto tuning runtime parameters.
13.
▲
by
saman_b
10y ago
Do you have anything specific in mind? The only code I found similar to this is uC++ [1], which has way more features and more sophisticated scheduler. I am using this as part of my research and wanted to have sth very simple. For all N:1 m
14.
▲
by
saman_b
10y ago
Good idea, I probably write a blog post on this later. If you take a look at [1], I explain the difference between N:1 and M:N mappings. StateThreads uses a N:1 mapping which means you can multiplex many fibers over a single thread and to t
15.
▲
by
saman_b
10y ago
In libdill approach, you are probably limited to only multiplex connections over multiple kernel threads. And when a connection is accepted over a kernel thread it has to perform all further instructions over that kernel thread. So it gives
16.
▲
by
saman_b
10y ago
You are right, I have access to machines with higher number of cores, but they have multiple sockets and at some point I need to address the cross NUMA cost which adds a whole new level of complexity and design decisions. For sure at some p
17.
▲
by
saman_b
10y ago
Yes, there is a specific reason behind it, but in the future I might consider a less restrictive license.
18.
▲
by
saman_b
10y ago
Thanks, oh all those fancy functions. I need to improve the interface a bit, as for now everything is only based on using uThreads as the unit of concurrency. e.g., this is a recursive Fibonacci: https://github.com/samanbarg
19.
▲
by
saman_b
10y ago
Right, however segmented stacks are have high overhead and stack copying is not very easy in C/C++. Thus, for now uThreads only support fixed size stacks, I know it makes it harder to be used in production, and in the future I might pr
20.
▲
by
saman_b
10y ago
Thanks! good point; now that I look at the page, there is not a single sample code in there. I'll update it soon.
21.
▲
by
saman_b
10y ago
Hi, I developed uThreads. I looked at lthreads quickly, and it seems lthreads only maps multiple coroutines onto a single pthread (N:1). Although, it adds the possibility of running multiple pthreads, but each pthread can only run their l
22.
▲
Show HN: uThreads – Concurrent User Threads in C and C++
(samanbarghi.com)
135 points
by
saman_b
10y ago
|
60 comments
23.
▲
UThreads: concurrent M:N fibers in C++
(github.com)
16 points
by
saman_b
10y ago
|
0 comments
24.
▲
C++ Intrusive lock-free multiple-producer single-consumer queue
(github.com)
4 points
by
saman_b
10y ago
|
0 comments
25.
▲
How to Wrap a System Call (Libc Function) in Linux
(samanbarghi.com)
1 points
by
saman_b
12y ago
|
0 comments
26.
▲
by
saman_b
12y ago
Thanks :)
27.
▲
by
saman_b
12y ago
That would be great, my email is: saman<dot>b<at>gmail<dot>com. I am not aware of such collection, and sure I would be happy to collaborate with you and expand on this. That sounds like a promising collection. Thanks for t
28.
▲
by
saman_b
12y ago
Nice, it would be nice to see those pieces. I guess you are looking to study arabesque ( http://en.wikipedia.org/wiki/Arabesque_(Islamic_art) , which includes calligraphy and patterns. "In the first mode, each repea
29.
▲
by
saman_b
12y ago
Thanks man, same for you :)
30.
▲
by
saman_b
12y ago
Thanks for letting me know, I tested it on chrome and firefox under Linux mint and Nazanin shows up correctly, I have to lay my hands on a Mac then.
More ›