The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



"Рассматривается возможность перевода NTPsec на язык Rust или Go"
Версия для распечатки Пред. тема | След. тема
Форум Разговоры, обсуждение новостей
Исходное сообщение [ Отслеживать ]
Подсказка: Ссылки "<<" и ">>" открывают первые и последние 10 сообщений.
. "Рассматривается возможность перевода NTPsec на язык Rust или..." –3 +/
Сообщение от Пользователь Debian (?), 10-Янв-17, 10:38 
> да

Нет. STW останавливает, а параллельная сборка -- нет.

Цитата из <https://blog.golang.org/go15gc>:

«
Go's new garbage collector is a concurrent, tri-color, mark-sweep collector, an idea first proposed by Dijkstra in 1978. This is a deliberate divergence from most "enterprise" grade garbage collectors of today, and one that we believe is well suited to the properties of modern hardware and the latency requirements of modern software.

In a tri-color collector, every object is either white, grey, or black and we view the heap as a graph of connected objects. At the start of a GC cycle all objects are white. The GC visits all roots, which are objects directly accessible by the application such as globals and things on the stack, and colors these grey. The GC then chooses a grey object, blackens it, and then scans it for pointers to other objects. When this scan finds a pointer to a white object, it turns that object grey. This process repeats until there are no more grey objects. At this point, white objects are known to be unreachable and can be reused.

This all happens concurrently with the application, known as the mutator, changing pointers while the collector is running. Hence, the mutator must maintain the invariant that no black object points to a white object, lest the garbage collector lose track of an object installed in a part of the heap it has already visited. Maintaining this invariant is the job of the write barrier, which is a small function run by the mutator whenever a pointer in the heap is modified. Go’s write barrier colors the now-reachable object grey if it is currently white, ensuring that the garbage collector will eventually scan it for pointers.
»

Впрочем, запрещать GC в критических участках это логичная идея.

Ответить | Правка | Наверх | Cообщить модератору

Оглавление
Рассматривается возможность перевода NTPsec на язык Rust или Go, opennews, 10-Янв-17, 09:54  [смотреть все]
Форумы | Темы | Пред. тема | След. тема



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру