Skip to content
Menu
Open World News Open World News
  • Privacy Policy
Open World News Open World News

Andy Wingo: are ephemerons primitive?

Posted on November 29, 2022 by Michael G

Good evening 🙂 A quick note, tonight: I’ve long thought that
ephemerons
are primitive and can’t be implemented with mark functions and/or
finalizers, but today I think I have a counterexample.

For context, one of the goals of the GC implementation I have been
working on on
is to replace
Guile‘s current use of the Boehm-Demers-Weiser (BDW) conservative
collector
. Of course, changing a
garbage collector for a production language runtime is risky, and for Guile one of the mitigation
strategies for this work is that the new collector is behind an abstract API
whose implementation can be chosen at compile-time, without requiring
changes to user code. That way we can first switch to
BDW-implementing-the-new-GC-API, then switch the implementation behind
that API to something else.

Abstracting GC is a tricky problem to get right, and I thank the MMTk
project
for showing that this is possible — you
have user-facing APIs that need to be implemented by concrete collectors,
but also extension points so that the user can provide some compile-time
configuration too, for example to provide field-tracing visitors that take into account how a user wants to lay out objects.

Anyway. As we discussed last time, ephemerons are usually have explicit
support from the GC, so we need an ephemeron abstraction as part of the
abstract GC API. The question is, can BDW-GC provide an implementation of
this API?

I think the answer is “yes, but it’s very gnarly and will kill
performance so bad that you won’t want to do it.”

the contenders

Consider that the primitives that you get with BDW-GC are custom mark
functions, run on objects when they are found to be live by the mark
workers; disappearing links, a kind of weak reference; and finalizers, which receive the object being finalized, can allocate, and indeed can resurrect the object.

BDW-GC’s finalizers are a powerful
primitive, but not one that is useful for implementing the “conjunction”
aspect of ephemerons, as they cannot constrain the marker’s idea of
graph connectivity: a finalizer can only prolong the life of an object subgraph,
not cut it short. So let’s put finalizers aside.

Weak references have a tantalizingly close kind of conjunction property:
if the weak reference itself is alive, and the referent is also
otherwise reachable, then the weak reference can be dereferenced.
However this primitive only involves the two objects E and K; there’s no
way to then condition traceability of a third object V to E and K.

We are left with mark functions. These are an extraordinarily powerful
interface in BDW-GC, but somewhat expensive also: not inlined, and going
against the grain of what BDW-GC is really about (heaps in which the
majority of all references are conservative). But, OK. They way they
work is, your program allocates a number of GC “kinds”, and associates
mark functions with those kinds. Then when you allocate objects, you
use those kinds. BDW-GC will call your mark functions when tracing an object of those kinds.

Let’s assume firstly that you have a kind for ephemerons; then when you
go to mark an ephemeron E, you mark the value V only if the key K has
been marked. Problem solved, right? Only halfway: you also have to
handle the case in which E is marked first, then K. So you publish E to
a global hash table, and… well. You would mark V when you mark a K for
which there is a published E. But, for that you need a hook into
marking V, and V can be any object…

So now we assume additionally that all objects are allocated with
user-provided custom mark functions, and that all mark functions check
if the marked object is in the published table of pending ephemerons,
and if so marks values. This is essentially what a proper ephemeron
implementation would do, though there are some optimizations one can do
to avoid checking the table for each object before the mark stack runs
empty for the first time. In this case, yes you can do it!
Additionally if you register disappearing links for the K field in each
E, you can know if an ephemeron E was marked dead in a previous
collection. Add a pre-mark hook (something BDW-GC provides) to clear
the pending ephemeron table, and you are in business.

yes, but no

So, it is possible to implement ephemerons with just custom mark
functions. I wouldn’t want to do it, though: missing the
mostly-avoid-pending-ephemeron-check optimization would be devastating,
and really what you want is support in the GC implementation. I think
that for the BDW-GC implementation in
whippet I’ll just implement
weak-key associations, in which the value is always marked strongly
unless the key was dead on a previous collection, using disappearing
links on the key field. That way a (possibly indirect) reference from a
value V to a key K can indeed keep K alive, but oh well: it’s a
conservative approximation of what should happen, and not worse than
what Guile has currently.

Good night and happy hacking!

Introducing WebStorm 2022.3!

Posted on November 29, 2022 by Michael G

We’ve just released WebStorm 2022.3, the third major update of the year for our JavaScript IDE. We hope that the new functionality, along with the other enhancements we’ve added to it, will make your coding experience with WebStorm more productive and enjoyable.

Here are the highlights:

  • Updated new project templates
  • Vitest support
  • Updates for Vue
  • Angular type narrowing and fixes
  • Code Vision for JavaScript and TypeScript
  • New UI available via a setting
  • Intention action preview
  • Improvements for Docker

Visit our website to learn more and start using WebStorm 2022.3 today.

Ubuntu Touch OTA-24 released for Ubuntu Phone users

Posted on November 29, 2022 by Michael G
Highlights of this release include initial gesture support with double-tap to wake for selected devices, improvements to fingerprint unlock by allowing more backoff time between read retries, as well as support for media buttons on headsets for most Ubuntu Phone devices. In addition, the Ubuntu Touch OTA-24 update adds support for handling the sms:// URL scheme for properly opening the Messaging app, adds Full HD 1080p support to the Aethercast implementation, improves SMS and MMS support, and adds various performance tweaks to the Mir-Android-Platform. I’m kind of surprised the current releases are still based on Ubuntu 16.04 – that’s quite an old release. They are working on upgrading the base to 20.04, and the switchover should happen relatively soon.

Fancy Daily Wear & Party Wear DIY Earrings Making At Home How to Make Simple Pearl Earrings at Home

Posted on November 28, 2022 by Michael G

Video by via Dailymotion Source Welcome Back To Crafty Stitch Channel… Today I’ll show you How To Make Pearl earrings and How to Make Simple Pearl Earrings at Home Beautiful Pearl Earring #pearl #earring Note: Subscribe to This Channel To get More Video About All Types of… Crafts Paper Flowers Ice Cream Stick Craft Wall…

To Delhi Airport via Dhaula Kuan

Posted on November 28, 2022 by Michael G

Video by via Dailymotion Source Indira Gandhi International Airport is the primary international airport of the National Capital Region of Delhi, India, situated in South West Delhi, 16 kilometres (9.9 mi) south west of New Delhi city centre. Named after Indira Gandhi, the former Prime Minister of India, it is the busiest airport in India….

Velvet Project – Mercy (reprise de Duffy)

Posted on November 28, 2022 by Michael G

Video by via Dailymotion Source Les landais du Velvet Project reprennent le titre “Mercy” de Duffy dans les studios de France Bleu Gascogne. Go to Source

News & Views Live: राज्यपालांना पदमुक्त केलं जाणार? Bhagatsingh Koshyari Controversy | Politics

Posted on November 28, 2022 by Michael G

Video by via Dailymotion Source News & Views Live: राज्यपालांना पदमुक्त केलं जाणार? Bhagatsingh Koshyari Controversy #BhagatsinghKoshyari #shivajimaharaj #maharashtranews #lokmatSubscribe to Our Channel https://www.youtube.com/user/LokmatNews?sub_confirmation=1 आमचा video आवडल्यास धन्यवाद. Like, Share and Subscribe करायला विसरू नका! मित्रांसोबत गप्पा मारताना विश्वसनीय, संशोधनावर आधारीत माहिती सादर करायची असेल तर लोकमतचे चॅनल सबस्क्राईब करा. कारण या चॅनलवर तुम्हाला पाहायला…

Como a dança ajuda os reclusos: “Esquecemos que estamos presos”

Posted on November 28, 2022 by Michael G

Video by via Dailymotion Source Um projeto de dança contemporânea na prisão do Linhó, perto de Lisboa, está a dar frutos e a mudar a vida de alguns reclusos. Go to Source

Enchanted Winter Garden at Antrim Castle Gardens opens for 2022

Posted on November 28, 2022 by Michael G

Video by via Dailymotion Source Go to Source

TikToker Constable Hameed Khan Interview – Jis Mulzim Ko Bhi Pakarta Ha Wo Uska Fan Nikal Aata Ha

Posted on November 28, 2022 by Michael G
Hameed khan is a young Constable in Punjab Police who also loves to make Tiktok videos. He has been making tiktok videos for quite a long time, and he has a following of 1.7 million on tiktok. UrduPoint anchor Zain Babu has interviewed him. What is his Duty timing and how did he get the time to make tiktok videos , let us know in this video.
Anchor: Zain Babu

#TikTok #PakistaniTikToker #ViralVideos #TikTokerHameedkhan #PunjabPolice #Lahore

Follow Us on Facebook: https://www.facebook.com/urdupoint.network/
Follow Us on Twitter: https://twitter.com/DailyUrduPoint
Follow Us on Instagram: https://www.instagram.com/urdupoint_com/
Visit Us on Web: https://www.urdupoint.com/

  • Previous
  • 1
  • …
  • 1,304
  • 1,305
  • 1,306
  • 1,307
  • 1,308
  • 1,309
  • 1,310
  • …
  • 1,531
  • Next

Recent Posts

  • [TUT] LoRa & LoRaWAN – MikroTik wAP LR8 kit mit The Things Network verbinden [4K | DE]
  • Mercado aguarda Powell e olha Trump, dados e Haddad | MINUTO TOURO DE OURO – 11/02/25
  • Dan Levy Gets Candid About Learning How To Act Differently After Schitt’s Creek: ‘It’s Physically…
  • Building a Rock Shelter & Overnight Stay in Heavy Snow 🏕️⛰️
  • Les milliardaires Elon Musk et Xavier Niel s’insultent copieusement

Categories

  • Android
  • Linux
  • News
  • Open Source
©2025 Open World News | Powered by Superb Themes
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT