Computer Organization and Design 笔记 - The Processor

操作系统 流水线 数据冲突 异常 精确中断 并行 超标量

Introduction

A abstract view of the implementation of the MIPS subset showing the major functional units and the major connections between them:

abstract-view@2x

The basic implementation of the MIPS subset, including the necessary multiplexors and control lines:

mips-basic@2x

asserted

The signal is logically high or true.

deasserted

The signal is logically low or false.

Clocking methodology

The approach used to determine when data is valid and stable relative to the clock.

Edge-triggered clocking

A clocking scheme in which all state changes occur on a clock edge.

control signal

A signal used for multiplexor selection or for directing the operation of a functional unit; contrasts with a data signal , which contains information that is operated on by a funcional unit.

The state element is changed only when the write control signal is asserted and a clock edge occurs.

Computer Organization and Design 笔记 - Arithmetic for Computers

操作系统 加法器 乘法器 中断 异常

Addition and Subtraction

  1. Add (add), and immediate (addi), and subtract (sub) cause exceptions on overflow. MIPS detects overflow with an exception (or interrupt ), which is an unscheduled procedure call. The address of current instruction is saved and the computer jumps to predefined address to invoke the appropriate routine for that exception.

    MIPS uses exception program counter (EPC) to contain the address of the instruction that causes the exception. The instruction move from system control (mfc0) is used to copy EPC into a general-purpose register.

  2. Add unsigned (addu), add immediate unsigned (addiu), and subtract unsigned (subu) do not cause exceptions on overflow. Programmers can trap overflow anyway: when overflow occurs, the sign bit of the result is not properly set. Compairing with sign bits of operands, the sign bit of the result can be determined.

SIMD (single instruction, multiple data): By partitioning the carry chains within a 64-bit adder, a processor could perform simultaneous operations on a short vecters of eight 8-bit operands, four 16-bit operands, etc. Vectors and 8-bit data often appears in multimedia routine.

Computer Organization and Design 笔记 - Abstractions

操作系统 编译 汇编

Concepts

Moore’s law

Over the history of computing hardware, the number of transistors on integrated circuits doubles approximately every two years.

Compiler

A program that translates high-level language statements into assembly language statements.

Assembler

A program that translates a symbolic version of instructions into the binary version.

High-level programming langrage

A portable language that is composed of words and algebraic notation that can be translated by a compiler into assembly language.

Assembly language

Asymbolic representation of machine instructions.

Machine language

A binary representation of machine instructions.

5 components of a computer

Input, Output, Memory, Control, Datapath

The last two sometimes combined and called the processor.

Instruction set architecture One key interface between the levels of abstraction is the instruction set architecture-the interface between the hardware and low-level software.

Modern Operating Systems 笔记 - Linux

操作系统 Unix Linux GNU Socket

History of Unix and Linux

MULTICS & UNICS

  • Researchers at M.I.T. joined forces with Bell Labs and Generic Electric and began designing a second-generation system, MULTICS(Multiplexed Information and Computing Service)
  • One of the Bell Labs researchers, Ken Thompson wrote a stripped-down MULTICS on a PDP-7 minicomputer. The system is called UNICS(UNiplexed Information and Computing Service) jokingly by Brian Kernighan, Bell Labs.
  • Thompson tied to rewite UNIX with B language of his own design and failed. Ritchie then designed a successor to B, called C. Working together, they rewrote UNIX in C.
  • Steve Johnson of Bell Labs designed and implemented the portable C compiler, which could be retargeted to produce code for any resonable machine with a only a moderate amount of effort.

Standard UNIX

  • AT&T released its first commercial UNIX: System III, then System V.
  • Aided by U.S. Dept. of Defense, Berkeley released an improved PDP-11 called 1BSD(First Berkeley Software Distribution), which supported virtual memory, TCP/IP, vi, csh, etc.
  • IEEE came up with POSIX(Portable Operating System of UNIXish), witch reconcile the two flavors of UNIX.

Modern Operating Systems 笔记 - File System

操作系统 文件系统

Files

File structures

Byte sequence , Record sequence , Tree

File Types

Regular files , Directories , Character special files , Block special files

File operations

Create , Delete , Open , Close , Read , Write , Append , Seek , Get attributes , Set attributes , Rename.

Makefile 入门

Bash C++ Makefile Unix Windows sed 引用 汇编 编译 进程 字符串 操作系统

make是软件开发中常用的工具程序(Utility software),常被用来构建C程序。make通过读取叫做“makefile”的文件,来自动化建构软件。

虽然make常被用来构建C程序,但它可用于绝大多数的文件处理过程。例如,更新一批图片的缩略图: http://harttle.github.io/2013/10/26/auto-thumb/

它是一种转化文件形式的工具,转换的目标称为“target”; 与此同时,它也检查文件的依赖关系,如果需要的话,它会调用一些外部软件来完成任务。 它的依赖关系检查系统非常简单,主要根据依赖文件的修改时间进行判断。 大多数情况下,它被用来编译源代码,生成结果代码,然后把结果代码连接起来生成可执行文件或者库文件。 它使用叫做Makefile的文件来确定一个target文件的依赖关系,然后把生成这个target的相关命令传给shell去执行。

中文Tutorial

导航: 上一页 下一页

🔝