4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

"Roach Motel" in JMM

Last updated at Posted at 2014-03-20

Roach Motel ≒ ごきぶりホイホイ

  • Roach Motel (insect trap), a device used to catch cockroaches.
  • In computers, sometimes as slang use:
    • Sometimes used to refer to a proprietary file standard -- "you can check your data in, but you can't check it out".
    • A property of the Java Memory Model, which lets compilers and Java Virtual Machines move accesses to memory into synchronized blocks, but not to move them out.

The JMM has what we call "roach motel" ordering. "Roach Motel" is Black Flag's name for their cockroach trap; in grad school, my apartment had lots and lots and lots of cockroaches, so I find it particularly salient (although I think it was probably Bill Pugh who came up with this association).

In the 1980s, the slogan for Black Flag Roach Motels was "Roaches check in, but they don't check out". The memory model is the same: accesses can be moved into synchronized blocks, but they can't be moved out.

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?