Wikipedia:Reference desk/Archives/Computing/2012 February 11

= February 11 =

Status of the internet
Is there a page where I can view the live status of the internet, like the global sea cables and stuff? 62.143.31.173 (talk) 17:05, 11 February 2012 (UTC)


 * http://www.internetpulse.net/ ? ¦ Reisio (talk) 17:20, 11 February 2012 (UTC)

"Appearance" of the identity function
To quote Nothing:"To instruct a computer processor to do nothing, a keyword such as 'NOP' may be available. This is a control abstraction; running processors are always computing something, if only the identity function."Reading Identity function, I'm not exactly sure what this is. What does the identity function "look like"? I'm imagining that the computer writes this function to a document until there's enough to cover a single printed page. How would the finished page appear? Nyttend (talk) 18:44, 11 February 2012 (UTC)
 * The passage is not very well worded. What it is really trying to say is that a running CPU is constantly executing machine language instructions, one per instruction cycle.  It may be executing instructions that have no effect, but it is still, in each cycle, executing an instruction and then moving on to the next instruction in the currently executing program. — Preceding unsigned comment added by Looie496 (talk • contribs) 19:36, 11 February 2012‎
 * I've heard people use this fact to suggest that it doesn't matter how much you're computing in relation to heat from the processor... which is not at all true with modern processors since they change voltages and scale down their operations in response to load. But that's an aside... Shadowjams (talk) 23:26, 11 February 2012 (UTC)


 * In the original 8086 instruction set (and probably the rest of the x86 derivatives), the NOP instruction is opcode 0x90. The rest of the 0x91-0x97 opcodes are things like XCHG BX AX; XCHG CX AX; XCHG DX AX, etc. In fact, all of the original user-modifiable 8086 data registers are there, except for register AX. From how things are laid out one can deduce that the NOP opcode is actually the "missing" XCHG AX AX instruction. That is, exchange the value in register AX with the value in register AX - effectively a do-nothing operation. As modern processors use microcode, though, so the internal implementation of the NOP operation is unlikely to still be XCHG AX AX. The other issue is that modern computers typically do multitasking, so most often when a program has nothing to do, it hands execution over to the OS and says "wake me up in 100 ms". The OS then hands out the extra available time to other programs running on the computer. If there's absolutely nothing that the computer can be working on, there's usually a "system idle loop" somewhere in the OS where the OS then obsessively checks for any new work "did he move the mouse? type on the keyboard? any network activity? ..." There may be some NOP opcodes in the loop to slow things down, but I believe most modern processors have the ability to throttle their execution speed, saving energy, so instead the OS would tell the processor to slow down until you need the speed again. -- 67.40.215.173 (talk) 01:10, 12 February 2012 (UTC)
 * The same system of interrupts it uses to say "wake me in 100ms", it can also use to say "wake me when you get input" or "wake me when you finish reading from the hard drive", so the OS doesn't need to poll for activity ("obsessively checking for new work"). Also, preemptive multitasking is much less failure-prone than cooperative multitasking, so programs get kicked off the CPU every once in a while whether or not they think they're done. Paul (Stansifer) 04:57, 12 February 2012 (UTC)
 * I'd say that the passage is misleading. The identity function is a function, so it takes an input and produces an output (in this case, the same value). This works to describe NOP, if you think of opcodes as functions on the state of the whole machine ... but people don't typically think of machine code that way, unless they're trying to do some kind of software verification. Paul (Stansifer) 04:57, 12 February 2012 (UTC)
 * When there's absolutely nothing to do, HLT. It's basically an infinitely long NOP. That's what you'll find in the idle loop of a multitasking OS if you look deep enough. It's the original (and simplest) power-saving interface. Also, I agree that "identity function operating on the machine state" is a definition of NOP that only a pure mathematician could love. 68.60.252.82 (talk) 11:39, 12 February 2012 (UTC)
 * Except that a NOP is not an identity function in that context since instruction pointer gets incremented. --145.94.77.43 (talk) 17:53, 12 February 2012 (UTC)
 * It's evident that our article contained some poetic abuse of notation. I recommend we change the wording and remove the term "identity function."  Whether that term is valid or not, it's uncommon at best, and misleading at worst.  I'll rewrite the article section if it's not done already, after consulting a reference..  Nimur (talk) 23:49, 12 February 2012 (UTC)

Limited WiFi Access
Hello. Is it possible for restaurants to limit WiFi access? If so, how can clients be tracked for the amount of time online? Can't be IP addresses, eh? Thanks in advance. --Mayfare (talk) 23:51, 11 February 2012 (UTC)
 * Yes. Probably by mac address 82.45.62.107 (talk) 00:09, 12 February 2012 (UTC)
 * Another way is to change a password daily, and publish it in the restaurant so that only genuine patrons can use it. Graeme Bartlett (talk) 10:14, 12 February 2012 (UTC)
 * Yes I think this is a more likely possibility then by MAC address for a restaurant or other similar scenario. Another common method is to print a ticket/voucher with an access code that's likely entered in to a captive portal. A ticket/voucher can then be provided on request to patrons, provided to customers with every order or even integrated in to the receipt system so one is given with every receipt. In this case since each customer gets a unique access code you can easily limit usage per customer if you feel is necessary. (You can try to do this with MAC address but it's trivial for a technically competent person to change on many laptops.) Nil Einne (talk) 12:42, 12 February 2012 (UTC)
 * But changing the MAC address doesn't get you anything if you are giving privileges (rather than removing them) per address. It's how I would do it: have them input a code, record the MAC address in a list of allowed addresses, drop the MAC address from the list when the time had expired. I don't know what else you'd use to guarantee that you were reliably granting access to the correct machine, anyway. --Mr.98 (talk) 03:42, 13 February 2012 (UTC)
 * Sorry for the confusion, if it wasn't clearly, I was largely talking from the restaurant's POV. In particularly when I mentioned MAC address in my last sentence, what I meant was if you used a used a MAC address to automatically limit usage per user, in a system where there was a common password. (I was making a distinction between a system with unique codes and a system with a common passwordl and pointing out what was possible with unique codes that was difficult to simply but reliably implement with a common password.) As for your statements, I'm not quite sure what your describing.
 * If you are describing a scenario where you have a common password (perhaps one that changes daily) and you ask the user to connect and your router shows which MAC addresses have recently tried to connect (hopefully only 1!) and manually allow it; remember we are talking about a restaurant and similar scenario where the staff may not be particularly competent and even if they are you likely don't want them spending much time on such a thing. (You can automate this by allowing all that tried to connect in the last 30 seconds or something when you push a button but this has a slight increased risk of enabling access to people you don't want and probably of greater annoyance this requires the staff and customer to semi-coordinate.)
 * Remember what the restaurant or whatever probably doesn't want is Joe the barber in the neighbouring shop using their wifi when he has no customers. Let alone the customers in the next door cafe where they don't have wifi. This could perhaps be implemented by a single common password that changes daily but in such a case the barber or neighbouring shop only needs to get it once each day. (If someone comes inside, you could refuse to serve them or even serve them with a trespass order but that gets a bit complicated as would any lawsuit for misuse over your wifi.) A unique code per customer with a time and perhaps also data limit makes this a lot more difficult and can be implemented in a system where the only thing the staff have to do is perhaps push a button to generate a voucher, or even just give the customer their receipt. And all the customer has to do is enter that code in to a captive portal. It also means that in less formal restaurants and cafes where it's connected to an order, people can't buy a drink and then hang out for 4 hours if you don't want that.
 * Internally the way the router enables access is probably by automatically allowing the MAC address of a device which enters a valid code, if this is what you meant then your technically correct. But the point is you still need the unique code. If you only allow one MAC address per code, whether you claim the access is limited by MAC address or by the code is largely a matter of semantics, and the technicalities will depend on the device. (I suspect most devices actually do it at the code level, obviously the router needs to drop the MAC address after the time limit is reached but this would be tied to the code.) Although from the restaurants POV, all they really need to know about is the code.
 * However it may be the case that you'd prefer to allow multiple devices per code, e.g. so the customer can use a smartphone, tablet and laptop without needing multiple codes. Or if the restaurant is the sort where you generally only get one order, a party with multiple people will probably want each person to have access. While this does cause additional risks. E.g. the barber could go dumpster diving or ask customers who leave if they can have the code. And if the device limit is very high, the competitor restaurant could send someone to get a new code every hour or whatever. And perhaps of greater concern in a less formal scenario one or two customers of a large party could order coffee and everyone could use the internet access which you may not want.
 * Nevertheless in some cases it may be an acceptable tradeoff rather then needing to generate multiple codes per person, or at least one for each person in a party. Apparently not all systems support this, e.g. pfSense didn't or at least not concurrently, not sure about m0n0wall. But if it is supported, then it's almost definitely the case that you want the time limiting to happen at the code level, otherwise we get back to the scenario where the customer can simply change their MAC address and continue to use the code past your allowed time limit and any data limit that exists (and of course so could your barber). In other words, while the way the router controls access may still be by automatically allowing the MAC address of any device which enters a valid unique code, the way it carries out accounting would be by code.
 * Nil Einne (talk) 20:00, 13 February 2012 (UTC)