Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Write-only code. (Score 1) 757

An ABI is supposed to be independent of platform

Absolutely not! ABIs are part of the definition of a platform. The Itanium C++ ABI is more or less the same on all (non-AArch32) *NIX systems, but the C ABIs are very different. For example, the C ABI on x86-32 on FreeBSD will pass a union of a pointer and an integer in a register, the Linux ABI will pass it on the stack.

Comment Re:Want to or will have to? (Score 1) 392

The EU rule requires that you either provide a Micro USB port or an adaptor. A USB-C port and a USB-C to Micro USB adaptor would fit that, though there is an effort underway to allow just USB-C. The design requirements of USB-C included making chargers and adaptors very cheap (there's an interesting story of how the two resistors that it uses to select the voltage were chosen).

Comment Re:Another failure (Score 1) 392

If your monitor / TV uses the HDCP DRM crap than it adds a few frames latency and so you need the audio to be delayed in the monitor by the same amount, even if it's going to external speakers. This was the main reason for pushing audio into the HDMI spec, though there are some other processing steps (e.g. upscaling using inter-frame information) that can also introduce latency and make being able to delay the audio by a fixed, display-controlled, amount useful.

Comment Re:Multiprocessing (Score 3, Interesting) 180

Nope, no cache flush for compare and exchange. Modern CPUs use a modified version of the MESI protocol, where each cache line has a state associated with it (modified, exclusive, shared, invalid in MESI, a few more in modern variants). When you do a compare and exchange, you move your copy of the cache line into exclusive state and everyone else's into invalid. Before this, you must have the line in the shared state (where multiple caches can have read-only copies). When another core wants access to the memory, it will request the line in shared state. If another cache has it in its exclusive state, then the exclusive line will be downgraded to shared and a copy of its contents sent to the requesting site.

If atomic operations had to go via main memory then they would be significantly slower than they are and would be a huge bottleneck for multicore systems.

Comment Re:Multiprocessing (Score 3, Interesting) 180

They don't flush, no. They will add memory fences, which will generate cache coherency bus traffic, but won't trigger a write back to main memory (modern CPUs can snoop the cache of other cores, so the data will be sent cache to cache).

The main reasons for flushing the cache are:

  • If you have some non-volatile DRAM and want to ensure consistency.
  • If you're doing DMA on anything other than the latest Intel chips, so that the DMA controller will see the data that you've flushed from the cache.
  • If you're writing a JIT compiler or some other form of self-modifying code (including a run-time linker) and need to ensure that i-cache and d-cache are consistent (I think x86 does this automatically, but I could be wrong).
  • If you're writing a crypto algorithm and want to make side-channel attacks via the cache difficult.

Comment Re:Maybe, maybe not. (Score 5, Interesting) 187

The three laws of robotics come from Asimov. Clarke's three laws are:
  1. When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
  2. The only way of discovering the limits of the possible is to venture a little way past them into the impossible.
  3. Any sufficiently advanced technology is indistinguishable from magic.

Comment Re:Email lets you organize your thoughts (Score 1) 115

Meetings are for things where you need realtime discussion and free-flow of ideas. They're good for working through problems (as long as they're sufficiently small) with a whiteboard and then photographing the board for archiving. They're absolutely terrible for status updates and so on, which are effectively broadcast communication.

Comment Re:Marriage (Score 5, Insightful) 161

I subscribe to the theory of natural selection when it comes to clothes. The purpose of the washing machine is to supply evolutionary pressure. Clothes that don't survive die off and don't reproduce (i.e. I don't buy similar ones in the future). Eventually my wardrobe is full of clothes that are fit for their environment. The same applies to crockery and the dishwasher.

Slashdot Top Deals

To write good code is a worthy challenge, and a source of civilized delight. -- stolen and paraphrased from William Safire

Working...