Wikipedia:Reference desk/Archives/Computing/2015 August 29

Computing desk
< August 28 << Jul | August | Sep >> August 30 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


August 29

edit

Protection rings

edit

Are kernel mode and userland in operating systems linked to hardware-based protection rings like the "supervisor mode" found in Intel CPUs or are they conceptually separate? Do they depend on protection rings in the processor? Can there be any levels inbetween them? — Melab±1 01:54, 29 August 2015 (UTC)[reply]

New Intel technology uses a little bit different terminology: here's an overview of vPro Security. At the end of the day, the distinction comes down to virtual memory and memory protection, which is used to isolate processes. The kernel in most operating systems may access all memory, whereas userland processes cannot. Only the kernel may get to those areas of memory because only the kernel can control the virtual memory translation hardware, which all gets rolled into the broad category of Intel Virtualization Technology. This privilege to control hardware is not a single "supervisor bit", although you can sort of abstract it as such. Nimur (talk) 02:50, 29 August 2015 (UTC)[reply]
It is a single supervisor bit (well, two bits on x86). vPro is a marketing term that doesn't refer to any particular feature of the x86 architecture. Hardware virtualization is similar to the kernel/user split but it isn't the same thing. People use different terms for it: hypervisor instead of kernel, guest code instead of user code, etc. -- BenRG (talk) 03:58, 29 August 2015 (UTC)[reply]
Here's another book to read - the Kernel Hackers' Guide - A Tour of the Kernel... but, it was written in 1998! That stuff barely applies to Pentium, let alone new Intel CPU architectures... and it references linux-1.x code. That's ancient! In any case, it's a good starting point, if reading kernel code directly isn't getting you the information you need in a format you can meaningfully ingest. At some point, your question becomes sufficiently technical that you'll probably only get meaningful answers by reading the code of a free software operating system.
Just keep in mind, Linux was designed as a Unix replacement for the Intel 80386. A lot of its software abstractions have historically baked in assumptions that hardware is "i386-like." Here's how syscalls work on 386 - using Interrupt 0x80 to magically "unprotect" the protected parts. Other CPUs - even ones made by Intel - have different hardware protections. This is what userland/kernel isolation looks like on ia64, arm-v7m, and arm64... those are the kinds of computers you probably use today! I won't pretend to explain how these machine-instructions actuate the hardware-based protection, except to direct you to the comments in the code, and to study the CPU programmer manuals from Intel or from your machine vendor.
Nimur (talk) 03:07, 29 August 2015 (UTC).[reply]
(EC) Not sure how likely it is that IA-64 is the kind of computer people are using today. I suspect when it comes to something like wikipedia, more people may be using even MIPS or PowerPC than IA-64. IA-64 which was only really used in servers, seems to be a dying architecture not having a new processor since 2012, and the next generation keeps getting delayed and even the long term commitment of the last major Itanium server vendor HP [1] is unclear. In terms of amd64 aka x86-64 which dominates the desktop space, I believe in long mode both Intel's and AMD's implementations still basically have protection rings, albeit only the two that were generally used i.e. those previously called ring 0 and ring 3, although they also sort of later added a lower level mode than ring 0 (I think sometimes? called ring -1) for virtualisation [2] [3] Nil Einne (talk) 04:53, 29 August 2015 (UTC)[reply]
Argh, you are absolutely correct! "ia64" is Linux terminology for Itanium, not for x86-64. I apologize for this egregious error. Rack this one up to late night / early morning editing.
For what it's worth, xnu, a different free software kernel, has a different directory structure; x86_64 code is separate from i386 code in osmfk/x86_64. Linux lumps the two Intel architectures into mostly the same place!
Nimur (talk) 14:54, 29 August 2015 (UTC)[reply]
Yes, "kernel mode" is normally a hardware supervisor mode and "user mode" is normally non-supervisor mode. On the x86 architecture there are four rings and the kernel normally runs in ring 0 and user code in ring 3. Rings 1 and 2 are rarely used, in part because they're not portable to other architectures. There's some more information here. There are some systems where a privilege separation is enforced by non-hardware means, such as the Java VM, but the terms "kernel mode" and "user mode" normally aren't used in that case. -- BenRG (talk) 03:58, 29 August 2015 (UTC)[reply]

Choosing a router that's capable of the most number of connections

edit

I'm looking for a new router for my home. Since I use bittorrent a lot, the number of total connections the router can handle is important to me. Which of the following is most important in determining how many connections a router can handle?

1. Memory

2. Number of CPU cores

3. CPU speed

My other car is a cadr (talk) 07:24, 29 August 2015 (UTC)[reply]

Do you have specific requirements you can quantify? Such as having a gigabit incoming Internet connection, or thousands of files shared on bittorrent simultaneously? Because for your typical "sharing a few dozen files, downloading yesterday's TV shows and movies over an ADSL line" scenario, even a $20 ADSL modem will serve you fine. (Don't buy a $20 router/modem - the absolutely dirt-cheapest ones are made of short-lived parts. Look for something that seems reliable; spend another $20 on it. And don't configure your bittorrent client to have hundreds of peers on each torrent, that's counterproductive.) 91.155.193.199 (talk) 19:47, 29 August 2015 (UTC)[reply]

What are the most common screen sizes (by pixel size)?

edit

On phones, tablets, and desktops? — Preceding unsigned comment added by Gacelisnothing (talkcontribs) 08:01, 29 August 2015 (UTC)[reply]

 
Video standards.
You may be interested in our articles Display resolution and List of common resolutions. -- ToE 10:14, 29 August 2015 (UTC)[reply]

How does OpenVPN's virtual network connection work?

edit

When I connect to a VPN using OpenVPN, it will create a virtual network interface under the Network Connections panel. So I end up with two network adapters, the real one and the virtual one. But how does the browser know which one to use? I didn't change any settings in the browser, and yet it's smart enough to use only the freshly created network interface and abandon the new one. Is this code in the browser itself or it is built-in in Windows or does OpenVPN do this? Is there some notion of a "primary interface" on Windows when you have multiple network interfaces?

Also, are all old TCP connection killed when this happens? Or does the existing TCP connections continue to use the old adapter while newly created TCP connections use the new adapter?

I noticed that not all program use the virtual interface. In qBittorrent, for example, there's advanced option to select the network interface, with the default choice being "Any Interface". Does this mean that qBittorrent will ignore any new interfaces as long as the existing one is still working? My other car is a cadr (talk) 08:02, 29 August 2015 (UTC)[reply]

My experience is that if you plug an Ethernet cable into a Windows machine that already has a Wi-Fi connection, old connections will continue to work over Wi-Fi.
A Windows/Unix sockets application can bind a listening socket to a particular IP address, which will restrict incoming connections to only that IP address (and probably to the associated network interface, though that isn't guaranteed). But there's no standard way to choose the interface used by outgoing connections. I gather from this article that on Windows Vista and later (but not XP), binding an outgoing socket to a local IP address will cause the associated interface to be used for outgoing packets. I think the same is true on Linux. But since it's not standard, it's not as widely supported as the incoming case. qBittorrent's network interface option might affect only listening sockets, or might affect all sockets.
You can probably use ForceBindIP to force any program to bind outgoing sockets to a particular IP address, although the documentation doesn't seem to explicitly say that it does that. You can use TCPView to check whether a process is actually using the source IP address you expect. -- BenRG (talk) 16:59, 29 August 2015 (UTC)[reply]
It's my understanding (though I don't have much direct experience of this) that Windows assigns a numerical value to each route in the IP routing table - the process used to calculate this is described here. You can also manually set route metric values with the route command, or have a fixed setting for a given adapter. When opening a socket connection, without further instruction (and maybe input from load-balancing and congestion-management stuff) the Windows networking stack will pick the valid route with the lowest metric. You can see the current routes configured on your machine by entering route print at the command line. What I suggest you do is do a route print > before.txt and then connect to the VPN and do route print > after.txt and then compare the two. I think the VPN software will create a new route and will force it to have a metric that is lower than the underlying connection - so programs trying to connect will preferentially use the VPN. -- Finlay McWalterTalk 17:20, 29 August 2015 (UTC)[reply]
Also, although Linux routes also do have metric values, the Linux networking stack doesn't honour them (any more), and things like VPNs instead manipulate the IP routing table to add additional default routes. -- Finlay McWalterTalk 18:53, 29 August 2015 (UTC)[reply]
edit

Can it be done? The only formatting I can find for footer text is for fonts.

MS Office 365

Hayttom (talk) 11:55, 29 August 2015 (UTC)[reply]

Good question! Excel certainly doesn't seem to want you to do that - likewise changing the date format and so on. Apparently you need to use VBA to do such a crazy thing as format the footer/header. I don't use VBA very much, but this seems to cover the basics of using VBA to format numbers and this provides some of the parameters you'll need to apply those changes to the footers. You'll have to do some experimenting, I'm afraid. 99.235.223.170 (talk) 01:58, 30 August 2015 (UTC)[reply]
(Wow, thanks. That looks like something that will have to wait for next weekend...) Hayttom (talk) 04:53, 30 August 2015 (UTC)[reply]

Dynamic IPs and IPv4 address exhaustion

edit

How IPs such as dynamic ones can still change amid IPv4 address exhaustion? Is it just because there are still few remaining addresses that dynamic IPs temporarily usurp and exchange in turns or they now change in a IPv6 format? Brandmeistertalk 18:29, 29 August 2015 (UTC)[reply]

A given ISP will have a pool of IP addresses assigned to them. They dynamically lease from their pool to their customers. When a customer gives up a lease, or it expires, the address returns to that ISP's pool. It doesn't go back to some national or global pool. It's the global address space that's all used up - because it's allocated (via national numbering authorities) to ISPs and other large organisations. -- Finlay McWalterTalk 19:01, 29 August 2015 (UTC)[reply]
A problem for ISPs is that they used to have far more customers than addresses, but because people connected intermittently via dialup, they usually didn't run out. But now lots of people have an always-on cable or DSL connection and so need an address most of the time. ISPs would like to go to their RIR (APNIC, RIPE, etc.) and ask for more IPv4 space, but the table is mostly bare. -- Finlay McWalterTalk 19:10, 29 August 2015 (UTC)[reply]

Self-DDOSing AOL article

edit

Using current Firefox and NoScript, when I go to [4] the article keeps reloading itself once a second endlessly. In order to read it, it's necessary to hit the "stop" button. While obviously they are the ones who have to fix this because it costs them the real money, I am curious whether there is some computer philosophy that explains whether the bug here is at "my end" or "theirs"? Wnt (talk) 19:38, 29 August 2015 (UTC)[reply]

How do you enable/disable the feature in Microsoft Word 2013 that automatically creates bullet lists?

edit

How do you enable/disable this particular feature in Microsoft Word 2013? This happens when I type certain characters: usually, the number "1"; or perhaps the single letter "a" or "A"; or perhaps a single asterisk (*); etc. When I type such a character, the software "thinks" that I want to start a bulleted list. Hence, the software actually starts to create a bulleted list (with the "1" or "a" or "A" or "asterisk" as the first bullet, and with appropriate indentations, etc.). How do I make this stop? Usually, I just want to type the number "1" or the letter "A" on its own, having no desire to create a bulleted list. With this "automatic" feature, it becomes a big pain in the neck. I have to "undo" what the program is starting to make look like a list. Then, when I type the number "1" or "A" again, it simply starts the bullet-list process, all over again. Very annoying. Very frustrating. Thanks. Joseph A. Spadaro (talk) 20:41, 29 August 2015 (UTC)[reply]

http://www.technipages.com/word-disable-automatic-numbering-and-bulleting -- Finlay McWalterTalk 20:48, 29 August 2015 (UTC)[reply]
Perfect. Thanks. I never knew that all of those options were available to me. As I was reading that link, however, another thought came to me. What happens when I do, in fact, want to create a bullet list? I don't assume that I go in and enable that function. Right? That function setting, as I understand it, is related to automatic formatting (and enabling or disabling the feature as an "automatic" feature). But, when I specifically do want to create a bullet list, then what do I need to do? Thanks. Joseph A. Spadaro (talk) 21:45, 29 August 2015 (UTC)[reply]
Select a paragraph or paragraphs and click the bullet or number buttons - http://www.addintools.com/documents/office/where-bullets-numbers.html -- Finlay McWalterTalk 21:50, 29 August 2015 (UTC)[reply]
Great. Thanks! Joseph A. Spadaro (talk) 22:43, 29 August 2015 (UTC)[reply]