CLRium # 6: Concurrency & Parallelism. Two days: from processor to async / await




    As you already noticed, the format of the seminar has evolved and took a new form: each subsequent seminar is now devoted entirely to a topic. The fifth was devoted to the topic of Garbage Collector and in 10 hours revealed everything that is possible, leaving absolutely private questions behind the brackets. And its culmination was a report on practical application (a question that interests everyone - “why know all this ??”)


    The second question, which I think everyone wants to know, but as a rule, there is no time for this, is the question of working in multi-threaded code and the question of planning and supporting its architecture. These questions are quite complex, frightening, and often repulsive in general. And that is exactly why the ordinary developer does not go beyond the simplest synchronization constructs. But there are so many interesting things around :)


    Not so long ago, I understood one seemingly simple truth: in order to understand how any top-level abstractions work, you need to understand how lower-level abstractions work. In other words, to understand how to work with multi-threaded code at the async / await level, you need to know the synchronization primitives and other basics of multi-threaded code in .NET at least. And what's even better - quite a bit from the level of the operating system. After that, most top-level abstractions will become clear automatically.


    At the new seminar, which this time concerns not only the .NET platform, as it was before, but essentially covers any platform (after all, multithreaded code works on the basis of lower-level abstractions), we will reveal this topic in the most detail:


    Workshop plan


    The basics


    To begin with, we will consider the base: everything that goes back to the operating system and processor. After all, any top-level mechanics work based on the rules of the lower. This will include the basics of the processor architecture, synchronization primitives, and the Windows and Linux operating system APIs. Did you know that there are several kinds of processes alone?


    BCL, Schedulers, Thread Locals, STA / MTA ...


    Having examined these abstractions and examined the rules for working with them, we will focus on the basic abstractions of the platform itself: BCL, Thread Locals, thread pools, and other basics. These abstractions are everywhere, but examples will be for the .NET platform. We will see the relationship with the operating system, their performance, as well as applicability in various situations. Finally, we will understand many issues that have not been reached: synchronization contexts, STA / MTA, how Thread Locals works, and much more.


    Platform mechanics


    With each new abstraction, plus in view of the fact that everything will be told side by side: in one day, you will begin to relate all knowledge to each other and we will smoothly switch to various mechanisms of a higher level: schedulers, background, multi-threaded code development models.


    Lock-free algorithms


    all the way to async / await. And in the end, we will look at more advanced multithreading algorithms. We will analyze a pair of lock-free algorithms so that each of you can create them yourself. And after that we will learn to make requirements for the development of our own.


    PLINQ / async-await


    Further, having absorbed the knowledge of the basics, we will begin to study libraries of high levels of abstractions: from PLINQ up to async / await, analyzing the features of working with each. Here I mean that you are approximately familiar with the libraries themselves and we will delve into each of them at a slightly more hardcore level.


    Of course, we will not be able to uncover the topic of Concurrency in one day: this topic is too extensive and multifaceted. It is for this reason that CLRium # 6 will go on for two days.


    Contacts



    Also popular now: