处理器,操作系统:32位,64位 [英] Processor, OS : 32bit, 64 bit

查看:218
本文介绍了处理器,操作系统:32位,64位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的节目和来自非CS背景(没有正式的程度)。我主要是程序的WinForms使用C#。

I am new to programming and come from a non-CS background (no formal degree). I mostly program winforms using C#.

我感到困惑的32位和64位....我的意思是,听说过32位操作系统,32位处理器,并在此基础上的程序可以有最大内存。它如何影响一个程序的速度。还有很多问题,这让前来的头脑。

我试图通过一些计算机组织与体系结构的书籍。但是,无论是我太笨了解什么是写在那里或作家假定读者有一定的CS背景。

I tried to go through some Computer Organization and Architecture books. But, either I am too dumb to understand what is written in there or the writers assume that the reader has some CS background.

有人能解释我的这些东西在一个普通的简单的英语或点我到一些东西,做到这一点。

编辑:我已阅读之类的东西在32位模式下,他们可以访问高达4GB的内存;在64位模式下,他们可以访问更多更多....我想知道为什么所有的这些事情。

I have read things like In 32-bit mode, they can access up to 4GB memory; in 64-bit mode, they can access much much more....I want to know WHY to all such things.

BOUNTY :下面的答案是真的很好....尤指由马丁。但是,我在看一个详尽的解释,但在普通的简单的英语。

BOUNTY: Answers below are really good....esp one by Martin. But, I am looking at a thorough explanation, but in plain simple English.

推荐答案

这真的一切都归结到电线。

It really all comes down to wires.

在数字电路中,只有0和1的(通常是低电压和高电压)可以从一个元件(CPU)的另一元件(存储器芯片)来发送。如果我只有1线,我只能送无论是1还是0比每个时钟周期的电线。这意味着我只能寻址2个字节(假设字节寻址,而整个地址,在短短1个周期的高速传输!)。

In digital circuits, only 0's and 1's (usually low voltage and high voltage) can be transmitted from one element (CPU) to another element (memory chip). If I have only 1 wire, I can only send either a 1 or a 0 over the wire per clock cycle. This means I can only address 2 bytes (assuming byte addressing, and that entire addresses are transmitted in just 1 cycle for speed!).

如果我有2个线,我可以处理4个字节。因为我可以发送:(0,0),(0,1),(1,0),或(1,1)在两个导线。所以基本上是2#线的力量。

If I have 2 wires, I can address 4 bytes. Because I can send: (0, 0), (0, 1), (1, 0), or (1, 1) over the two wires. So basically it's 2 to the power of # of wires.

所以,如果我有32个线,我可以支持4GB,如果我有64线,我可以解决很多。

So if I have 32 wires, I can address 4 GB, and if I have 64 wires, I can address a lot more.

有其他的技巧工程师可以做,以解决一个更大的地址空间比导线允许。例如。分裂出地址分为两个部分,并在下一周期发送的一半在第一周期和第二半。但是,这意味着你的内存接口将有一半的速度。

There are other tricks that engineers can do to address a larger address space than the wires allow for. E.g. splitting up the address into two parts and sending one half in the first cycle and the second half on the next cycle. But that means that your memory interface will be half as fast.

编辑我的评论到这里(未经编辑的);),并使之成为维基如果任何人有什么有趣的补充,以及

Edited my comments into here (unedited) ;) And making it a wiki if anyone has anything interesting to add as well.

像其他评论都提到,2 ^ 32(2的32次方)= 4294967296,也就是4 GB。而2 ^ 64 18,446,744,073,709,551,616。为了挖掘更多(你可能读这亨纳和放大器;帕特森)处理器,包含它使用的临时空间,用于存储其计算结果寄存器。一个CPU只知道如何做简单的算术,并且知道如何来移动数据。自然地,这些寄存器的大小是在比特作为#-Bits架构的是相同的宽度,所以在32位CPU的寄存器将是32位宽,64位CPU的寄存器将是64位宽。

Like other comments have mentioned, 2^32 (2 to the power of 32) = 4294967296, which is 4 GB. And 2^64 is 18,446,744,073,709,551,616. To dig in further (and you probably read this in Hennesey & Patterson) processors contains registers that it uses as "scratch space" for storing the results of its computations. A CPU only knows how to do simple arithmetic and knows how to move data around. Naturally, the size of these registers are the same width in bits as the "#-bits" of architecture it is, so a 32-bit CPU's registers will be 32-bits wide, and 64-bit CPU's registers will be 64-bits wide.

将有例外,当涉及到浮点运算(处理双precision)或其它SIMD指令(单指令多数据的命令)。在CPU负荷和数据保存到和从主存储器(RAM中)。由于CPU也使用这些寄存器来计算存储器地址(物理和虚拟的),的存储器,它可以解决的量也相同,为它的寄存器的宽度。有一些CPU的处理地址计算的特殊扩展寄存器,但那些我称之为后的想法,增加后的工程师们意识到,他们需要它。

There will be exceptions to this when it comes to floating point (to handle double precision) or other SIMD instructions (single-instruction, multiple data commands). The CPU loads and saves the data to and from the main memory (the RAM). Since the CPU also uses these registers to compute memory addresses (physical and virtual), the amount of memory that it can address is also the same as the width of its registers. There are some CPUs that handles address computation with special extended registers, but those I would call "after thoughts" added after engineers realize they needed it.

目前,64位是相当多解决实际物理内存。大多数的64位CPU将省略不少电线,当涉及到CPU到内存高达接线由于实用性。它不会使意义,使用了precious主板的房地产运行总是有0的电线。更何况,以有今天的DIMM内存密度将需要4十亿DIMM插槽最大金额:)

At the moment 64-bits is quite a lot for addressing real physical memory. Most 64-bit CPUs will omit quite a few wires when it comes to wiring up the CPU to the memory due to practicality. It won't make sense to use up precious motherboard real estate to run wires that will always have 0's. Not to mention in order to have the max amount of RAM with today's DIMM density would require 4 billion dimm slots :)

以外的存储器的量增加,64位处理器提供为大于2 ^ 32的较大的整数号码更快的计算。 previously程序员(或编译器,其也被编程的程序员)将具有通过取两个32位寄存器和处理任何溢出的情况下,以模拟具有64位的寄存器。但在64位的CPU,将通过CPU本身进行处理。

Other than the increased amount of memory, 64-bit processors offer faster computation for integer numbers larger than 2^32. Previously programmers (or compilers, which is also programmed by programmers ;) would have to simulate having a 64-bit register by taking up two 32-bit registers and handling any overflow situations. But on 64-bit CPUs it would be handled by the CPU itself.

的缺点是,一个64位CPU(一切相等)将消耗更多的功率比32位CPU只是由于(大致)所需的电路数量的两倍。然而,在现实中你永远无法得到平等的比较,因为较新的CPU将具有更少的漏电新的硅工艺制造,让您补习班更多的​​电路在同一个芯片尺寸等,但64位架构将消耗两倍记忆。曾经被认为难看的86的可变指令长度实际上是使用一个固定的指令长度相比,现在的体系结构的优势。

The drawback is that a 64-bit CPU (with everything equal) would consume more power than a 32-bit CPU just due to (roughly) twice the amount of circuitry needed. However, in reality you will never get equal comparison because newer CPUs will be manufactured in newer silicon processes that have less power leakage, allow you to cram more circuit in the same die size, etc. But 64-bit architectures would consume twice as much memory. What was once considered "ugly" of x86's variable instruction length is actually an advantage now compared to architectures that uses a fixed instruction size.

这篇关于处理器,操作系统:32位,64位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆