ostep01-Introduction to Operating Systems
running program
a running program does one very simple thing: it executes instructions. Many millions (and these days, even billions) of times every second, the processor fetches an instruction from memory, decodes it (i.e., figures out which instruction this is), and executes it (i.e., it does the thing that it is supposed to do, like add two numbers together, access memory, check a condition, jump to a function, and so forth).
Von Noumann Model
The Stored Program Computer
1943: ENIAC
• Presper Eckert and John Mauchly – first general electronic computer.
(or was it John V. Atanasoff in 1939?)
• Hard-wired program – settings of dials and switches.
1944: Beginnings of EDVAC
• among other improvements, includes program stored in memory
1945: John von Neumann
• wrote a report on the stored program concept,
known as the First Draft of a Report on EDVAC
The basic structure proposed in the draft became known
as the “von Neumann machine” (or model).
• a memory, containing instructions and data
• a processing unit, for performing arithmetic and logical operations
• a control unit, for interpreting instructions
参考文献
http://none.cs.umass.edu/~dganesan/courses/fall09/handouts/Chapter4.pdf
OS
- the primary way to make computer ease-to-use is virtualization
- is a resource manager
- provides system calls、API and standard libraries
Virtualization
virtualizing CPU
e.g.:running multiple program at once as if there exist many CPUs for different programs.
Virtualizing memory
e.g.:running 2 same programs simultaneously,they may be allocated the same memory address and hava the same value
Concurrency
e.g.:multithread program do not execute <font color=099ff size=5 face="΢ÈíÑźÚ">atomically</font> can lead to unexpected results
Persistence
e.g.:DRAM violate
I/O device long-lived information
hard drive、SSD
file system
open()
write()
close()
journaling
copy-on-write
Design Goals
1、abstraction
2、performance,minimize the overheads of OS
3、protection between applications,isolation of processes
4、reliability
5、energy-efficiency
6、security
7、mobility