《深入理解计算机系统》的原文摘录

  • Combinational circuits, by their very nature, do not store any information. Instead, they simply react to the signals at their inputs, generating outputs equal to some function of the inputs. (查看原文)
    晨星 2012-08-04 23:34:15
    —— 引自第361页
  • To create sequential circuits, that is, systems that have state, and perform computations on that state, we must introduce devices that store information represented as bits. (查看原文)
    晨星 2012-08-04 23:35:37
    —— 引自第361页
  • A key point is that the registers serve as barriers between the combinational logic in different parts of the circuit. Values only propagate from a register input to its output once every clock cycle at the rising clock edge. (查看原文)
    晨星 2012-08-04 23:37:31
    —— 引自第361页
  • In general, processing an instruction involves a number of operations. We organize them in a particular sequence of stages, attempting to make all instructions follow a uniform sequence, even though the instructions differ greatly in their actions. (查看原文)
    晨星 2012-08-04 23:42:14
    —— 引自第364页
  • Informal description of instruction processing stage: Fetch: reads bytes of an instruction from memory, using the program counter (PC) as the memory address. Decode: reads up to two operands from the register file, giving values valA and/or valB. Execute: the arithmetic/logic unit (ALU) either performs the operations specified by the instruction, computes the effective address of a memory reference, or increments or decrements the stack pointer, giving the result valE. Memory: may write data to memory, or read data from memory (valM). Write back: writes back up to 2 results to the register file. PC update: the PC is set to the address of the next instruction. (查看原文)
    晨星 2012-08-04 23:42:56
    —— 引自第364页
  • The cost of duplicating blocks of logic in hardware is much higher than the cost of having multiple copies of code in software. It is also more difficult to deal with many special cases and idiosyncrasies in a hardware system than with software. (查看原文)
    晨星 2012-08-04 23:43:57
    —— 引自第365页
  • Devising a partitioning of the system computation into a series of stages having uniform delays can be a major challenge for hardware designers. (查看原文)
    晨星 2012-08-04 23:44:54
    —— 引自第396页
  • 由于C对同时包含有符号和无符号数的表达式的处理方式,出现了一些奇特的行为,当执行一个运算符时,如果它的一个运算数是有符号的而另一个是无符号的,那么C会隐含地将含有符号参数强制类型转换为无符号数,并假设这两个数都是非负的,来执行这个运算。 考虑一下比较式-1<0U, 因为第二个运算数是无符号的,所以第一个运算数就会隐含地转换为无符号数。因此表达式就等价于4294967295U<0U, 这个答案明显是错误的。 (查看原文)
    [已注销] 2012-08-18 11:59:18
    —— 引自第49页
  • Static linking Object file Relocatable object file Executable object file Shared object file: A special type of relocatable object file (查看原文)
    不定期犯二青年 2012-08-23 11:04:26
    —— 引自章节:Chapter 7 Linking
  • How linkers resolve Multiply defined global symbols Rules 1. Multiply strong symbols are not allowed 2. Given a strong symbol and multiple weak symbols, choose the strong one. 3. Given multiple weak symbols, choose any of them. (查看原文)
    不定期犯二青年 2012-08-24 08:58:39
    —— 引自章节:Chapter 7 Linking
  • GCC -fno-common (查看原文)
    不定期犯二青年 2012-08-24 08:58:39
    —— 引自章节:Chapter 7 Linking
  • The general rules for libraries is to place them at end of command line (查看原文)
    不定期犯二青年 1回复 2012-08-25 10:21:47
    —— 引自章节:Chapter 7 Linking
  • Libraries can be repeated on the command line if necessary to satisfy the dependence requirements (查看原文)
    不定期犯二青年 1回复 2012-08-25 10:21:47
    —— 引自章节:Chapter 7 Linking
  • Relocation consists of two steps 1. Relocating sections and symbol definitions. After this step, every instruction and global variable in the program has a unique run-time memory address. 2. Relocating symbol reference within sections. To perform this step, the linker relies on data structures in the relocatable object module known as the relocatable entries. (查看原文)
    不定期犯二青年 1回复 2012-08-25 10:21:47
    —— 引自章节:Chapter 7 Linking
  • Static libraries, like all software, need to be maintained and updated periodically (查看原文)
    不定期犯二青年 1回复 2012-08-25 10:21:47
    —— 引自章节:Chapter 7 Linking
  • First, in any given file system, there is exactly one .so file for a particular library. Second, a single copy of the .text section of a shared library in memory can be shared by different running processes. (查看原文)
    不定期犯二青年 2回复 2012-08-28 09:37:47
    —— 引自章节:Chapter 7 Linking
  • How can multiple process share a single copy of code? Compile library code that it can be loaded and executed at any address. Such code is known as position-independent code(PIC) (查看原文)
    不定期犯二青年 2回复 2012-08-28 09:37:47
    —— 引自章节:Chapter 7 Linking
  • Tools for manipulating object files AR: Creates static libraries, and inserts, deletes, lists, and extracts members. STRINGS: Lists all of the printable strings contained in an object file. STRIP: Delete symbol table information from an object file. NM: Lists the names and sizes of the sections in an object file. SIZE: Lists the name and sections in an object file. READELF: Displays the complete structure of an object file, including all of the information encoded in the ELF header, subsumed the functionality of SIZE and NM. OBJDUMP: The mother of all library tools. Can display all the information in an object file. It's most useful function is disassembling the binary instructions in the .text section. LDD: list the shared libraries that is needed at run time. (查看原文)
    不定期犯二青年 2回复 2012-08-28 09:37:47
    —— 引自章节:Chapter 7 Linking
  • 1. The handler returns control to the current instruction, the instruction that was executing when event occurred. 2. The handler returns control to next, the instruction that would have executed next had the exception not occurred. 3. The handler aborts the interrupted program. (查看原文)
    不定期犯二青年 2012-08-29 15:20:45
    —— 引自章节:Chapter 8 Exception Control Fl
  • Exceptions can be divided into four classes: Interrupts, traps, faults and aborts 1. Class: Interrupt Cause: Signal from I/O device Sync/Async: Async Return behavior: Always return to next instruction 2. Class: Trap Cause: Intentional exception Sync/Async: Sync Return behavior: Always return to next instruction 3. Class: Fault Cause: Potentially recoverable error Sync/Async: Sync Return behavior: Might return to current instruction 4. Class: Abort Cause: Nonrecoverable error Sync/Async: Sync Return behavior: Never returns (查看原文)
    不定期犯二青年 2012-08-29 15:20:45
    —— 引自章节:Chapter 8 Exception Control Fl
<前页 1 2 3 4 5 6 7 8 9 ... 17 18 后页>