Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1828688
  • 博文数量: 283
  • 博客积分: 10141
  • 博客等级: 上将
  • 技术积分: 2931
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-21 14:33
文章分类

全部博文(283)

文章存档

2013年(2)

2012年(2)

2011年(17)

2010年(36)

2009年(17)

2008年(18)

2007年(66)

2006年(105)

2005年(20)

分类:

2006-02-27 14:13:10

2.3 The process concept

2.3.1 Process by analogy

       通过几个比喻解释了进程与代码、进程同步、进程间的资源竞争与切换以及中断的概念。

       Static text & Dynamic process of executing the code.

       引自Brinch Hansen(1973a):

Data:  Physical phenomena chosen by convention to represent certain aspects of our conceptual and real world. (transmit and store information, and derive new information)

Operation: A rule for deriving a finite set of data (output) from another finite set (input).

Computation: A finite set of operations applied to a finite set of data in an attempt to solve a problem.

Program: A description of a computation in a formal language.

Computer: A physical system capable of carring out computations by interpreting programs.

Virtual machine: A computer simulated partly by program.

Process: A computation in which the operations are carried out strictly one at a time: concurrent processes overlap in time.

               They are disjoint if each refers to private data only and interacting if they refer to common data.

在分时系统中,不同用户(进程)调用同一程序时(书中以编译器为例),每个用户有单独的进程各自取指令并执行,在这种情况下,更应该称为是disjoint而非interacting.(本书集中讨论interacting processes的问题。)

 

2.3.2 Multi-threaded processes

需要线程的原因:In modern systems, particularly since the advent of window-based interfaces there is often a need for a single program (or application) to allow several activities to be in progress at the same time.

使用进程作一个程序运行的初始化工作,而使用不同的线程处理不同的独立活动,这样,线程就成了处理器的调度实体。支持这种机制的系统首先会创建只有一个线程的进程,当有需求时,再创建新线程。

Process is therefore the general abtraction for a dynamic entity which runs on a processor.

 

2.4 Operating system functions

       要理解与设计一个系统,就要明白一个操作系统能为其他系统或者应用程序提供什么样的环境和功能,操作系统如何控制应用程序并具有隐藏性与自我保护的能力。

       The functions of an operating system are broadly:

1) To manage resources

2) To provide a service for its clients, which may be utilities, applications or                   human users.

       操作系统需要注意的几个问题: Protection mechanisms

                                                                Device handling

                                 Memory management

 

阅读(1369) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~