Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Re:I agree. (Score 1) 106

In principle, Objective C the language can be used for dynamic binding; in practice, the Objective C runtime, as represented in crt1.o, and in the dyld and later dyle dynamic linkers, it can't be. This was an intentional decision by Apple to prevent a dynamic binding override from changing aspects of the UI, and to prevent malicious code being injected into your program - this is a position Apple strengthened by adding code signing.

I have to wonder what you're talking about here. First of all, the Objective-C runtime is not in crt1.o. This contains some symbols that allow dyld to find things in the executable. The Objective-C runtime is in libobjc.dyld. Every message send (method invocation) in Objective-C goes via one of the objc_msgSend() family of functions and these all do late binding. You can define a category on a system class and override methods, or you can use method swizzling via explicit APIs such as class_replaceMethod(). Apple does absolutely nothing to stop this, because the OS X and iOS security model does not depend on the integrity of system shared libraries within a process. It is based on the MAC framework from FreeBSD and enforces limits on interactions of the process with the wider system. A process is free to do whatever it wants within its own address space without violating the security model.

Comment Re:Garbage Collection is not O(GC)=0 (Score 1) 106

The core issue is that GC vs no GC is a false dichotomy. You can't get away without GC, the question is whether you use a general-purpose algorithm, like tracing or reference counting with cycle detection, or a special-purpose design. This is especially true on mobile: if a desktop application leaks memory then it will take a while to fill up swap, but it might not be noticed. Apple provides a very coarse-grained automatic GC for iOS: applications notify the OS that they have no unsaved data and then can be kill -9'd in the background and restarted on demand. They also provide reference counting (with explicit cycle breaking via weak references, no automatic cycle collection) as a tool for developers to build per-application memory management strategies. Android, in contrast, provides a finer-grained automatic GC based on generational tracing.

It confuses me that many of the advocates of avoiding automatic GC seem to follow a train of reasoning something like this:

  • Memory management is a hard problem.
  • Therefore, we can't trust a team of skilled programmers to get a general solution right.
  • Therefore, we will trust every average developer to get it right.

Most of the time, GC can be cleanly integrated with event delivery in interactive applications: you set the GC to only collect if memory is exhausted while handling an event and allow application memory to grow, and you then do a more aggressive collection when there are no pending events. This doesn't work for large multiuser server applications, because they can easily do a few hundred GBs of allocations in between idle periods, but it's surprisingly effective for typical desktop and mobile apps.

Comment Re:Victim Card (Score 1) 1501

You know, first well-know "harsh" conversation from Linus was the one with Tanembaum, if you see my point

The one where the person that now develops a kernel that ships with FUSE and CUSE, and which has its largest install base running on top of the Xen microkernel in cloud deployments or an L4-derived microkernel in mobile deployments, was saying that microkernels are bad?

Comment Re:Linus management technique works (Score 4, Interesting) 1501

Someone recently cc'd him on a post on the LLVM mailing list, and he decided to chime in with a long rant where he was both rude and technically incorrect. It made me very glad that I don't use Linux, and just that little bit less likely to respond to bug reports that only affect people who do. Meanwhile, I recently got a bug report from one of the OpenBSD developers (a community with a reputation for being somewhat... acerbic). It was detailed, polite, and proposed two possible fixes. It was followed up by testing of the fix that I proposed. I don't use OpenBSD either, but I'm a lot more likely to fix bugs for people who do because this report was characteristic of my interactions with their developers.

Comment Re:Why not use real domains instead? (Score 1) 115

Using .local is a bad idea, because it's also the domain used for mDNS. This caused quite a few places problems when they started getting Macs with mDNS support appearing on the network. Now most operating systems support it, so people have had to work around it. For a while, some systems were putting .local in the search domains list, which made things all sorts of fun...

Comment Re:Plug can't support ZFS (Score 1) 87

ZFS RAM usage depends on the size of your pool, whether you need deduplication, and your performance needs. The rule of thumb for ZFS is 1GB of RAM per TB of storage, 2GB if you want deduplication. This, however, assumes that you are using mechanical disks and either using the pool locally or via something like iSCSI over GigE. If you're using it over WiFi, then you can get away with a really small ARC, because a cache miss won't slow things down that much, especially if the miss is filled by something that can do random reads quickly.

Comment Re: corporate policy (Score 1) 196

Price per TB is often the wrong metric. Price per used TB is more important. If you have a rack of machines each with disks at the price / size sweet spot of around 1TB, it doesn't actually buy you anything extra if each one is only using 20-100GB. Far more important for most workloads, however, is price per IOPS. Consolidating storage behind something with a couple of big SSD caches can be a huge win here. Getting data from RAM on a machine on a local network is faster than getting it from a local disk, and getting it from an SSD over the network is in the same ballpark.

Comment Re:I never surf the internet from the base OS anym (Score 1) 196

The same is true of Xen, for example; it boots as pure Linux and then Xen takes over Ring-0

No it doesn't. Xen boots and then launches a PV guest as dom 0. The PV guest starts in ring 1 in x86 or ring 3 on x86-64 with the CPU already in protected mode. The kernel entry point is also different for PV guests, so that you can have a single kernel binary that boots as a PV guest or a bare-metal OS. With newer Xen, the dom 0 guest can be PVH, so it runs in ring 0, but with Xen in the hypervisor 'ring -1' mode. It still starts via the Xen entry point, however, not the normal boot process.

Comment Re:It costs the government NOTHING. (Score 4, Interesting) 174

Wow, that's the most oversimplified attempt at discussing economics I've seen for a long time. Hint: economics is complicated - if it were easy we'd have a simple working system that everyone could agree one (or, at least, the people who worked out out would get very rich by betting on the economy 100% correctly and other people would notice) - and any explanation that simple is likely to be wrong.

Consider the following counter example:

The government builds and maintains a road between two places. This employs people, taking them out of the labour pool where they could be doing other things, so it's a cost. But it also allows the two places to trade more cheaply, which increases wealth production. Similarly, employers at either end of the road would have access to a wider pool of employees and potential employees to a wider pool of employers and so people would end up in more productive employment.

Now, would the same apply if private industry built the road? This is where it starts to get more complicated. First, who would build the road? It might be some consortium of businesses at both ends who wanted to use it. If so, then they might charge money to anyone not part of the consortium to use it, which would give them a competitive advantage, but be less healthy for the economy as a whole by producing a barrier to competition (and, most specifically, a barrier to entry for new companies).

It might be a third party that thought that the road would be profitable, who would run it as a 'common carrier' toll road. This, however, would provide a disincentive for people to use it. If they priced it too low, then they'd go out of business (which would discourage future road-building companies). If they priced it too high, then they'd make it unprofitable for some users to use it, however given that the cost of the road is now a sunk cost the economy as a whole benefits if as many people as would gain any benefit at all from it use it.

In some cases, the benefit to the economy may be significantly lower than the cost of the road, so it would not make sense for the government to make the investment. It's often difficult to make that call, however. In the UK, be Beeching Report identified a large number of unprofitable railway lines and, to save taxpayer money, the nationalised railway service closed them. Unfortunately, it turned out that a lot of the unprofitable lines were ones that got people from near where they lived to a more profitable line. When they were closed, people at the edges ended up having to buy cars, which meant that they no longer used the larger lines either, and so pushed those into unprofitability (and so there was a second Beeching Report some years later which repeated the entire mistake). The cost to the economy of no longer having a widespread, cheap, railway network is widely agreed by economists to be significantly greater than the savings from closing the lines.

A nationally owned private rail operator may have seen further ahead, but most likely they'd have had shareholders making the same demands: sell off the unprofitable lines and concentrate on the profitable ones. A larger number of smaller railway operators would have had similar problems, with the ones operating the unprofitable lines going out of business and reducing demand on the profitable ones.

Slashdot Top Deals

The hardest part of climbing the ladder of success is getting through the crowd at the bottom.

Working...