开启辅助访问
浅色 暗色
随便看看

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问移动社区

搜索
英语家园 门户 电脑技术 查看主题

计算机英语翻译

发布者: qyy945 | 发布时间: 2008-6-20 23:35| 查看数: 5021| 评论数: 3|帖子模式



1.2 Hardware Here we list the main hardware concepts.

1.2.1 The CPU The CPU, or central processor unit is the heart and soul of every computer. This is the part which does the work of executing machine instructions. Traditionally, it is just one microprocessor with lots of pins to connect is to memory and devices - usually identifiable by being the largest chip.

On modern machines, there may be several CPUs which can work in parallel. Also VLSI or very large scale integration technology has made it possible to put very many separate processors and memory into a single package, so the physical distinction between the CPU and its support chips is getting blurred.

Nevertheless, the CPU is still logically separate from the memory and devices. The CPU is driven by a `clock' or pulse generator. Each instruction completes in a certain number of `clock cycles'. Traditionally CPUs are based on CISC (Complex Instruction Set Computing) architecture, where a single instruction takes one or more clock cycles to complete. A new trend is to build RISC (Reduced Instruction Set Computing) processors which aim to be more efficient for a subset of instructions by using redundancy.

These have simpler instructions but can execute much more quickly, sometimes with several instructions per clock cycle.

1.2.2 Memory The primary memory is the most important resource a computer has. Since CPUs are only made with instructions for reading and writing to memory, no programs would be able to run without it. There are two types of memory: RAM - random access memory, or read/write memory, which loses its contents when the machine is switched off, and ROM - read only memory, which never loses its contents unless destroyed. ROM is normally used for storing those most fundamental parts of the operating system which are required the instant a computer is switched on, before it knows about disks etc.

1.2.3 Devices The concepts of a device really has two parts. There is the hardware unit which is connected to the machine, and there is the logical device which is a name given by the OS to a legal entry point for talking to a hardware-device. When a user writes to a logical device, the OS invokes a device driver which performs the physical operations of controlling the hardware.

For example, when writing to a disk, the OS must control the movement of the read-write heads.

When writing to a printer, the OS places the information in a queue and services the request when the printer becomes free. Some common logical devices are: the system disks, the keyboard, the screen, the printer and the audio device. Disks and tapes are often called secondary memory or secondary storage.

1.2.4 Interrupts, traps, exceptions Interrupts are hardware signals which are sent to the CPU by the devices it is connected to. These signals literally interrupt the CPU from what it is doing and demand that it spend a few clock cycles servicing a request.

For example, interrupts may come from the keyboard because a user pressed a key. Then the CPU must stop what it is doing and read the keyboard, place the key value into a buffer for later reading, and return to what it was doing. Other `events' generate interrupts: the system clock sends interrupts at periodic intervals, disk devices generate interrupts when they have finished an I/O task and interrupts can be used to allow computers to monitor sensors and detectors. User programs can also generate `software interrupts' in order to handle special situations like a `division by zero' error.

These are often called traps or exceptions on some systems. Interrupts are graded in levels. Low level interrupts have a low priority, whereas high level interrupts have a high priority.

A high level interrupt can interrupt a low level interrupt, so that the CPU must be able to recover from several `layers' of interruption and end up doing what it was originally doing. This is accomplished by means of a stack or heap1.4. Moreover, programs can often choose whether or not they wish to be interrupted by setting an interrupt mask which masks out the interrupts it does not want to hear about. Masking interrupts can be dangerous, since data can be lost. All systems therefore have non-maskable interrupts for the most crucial operations.



1.3 Software



1.3.1 Resource management In order to keep track of how the system resources are being used, an OS must keep tables or lists telling it what is free an what is not. For example, data cannot be stored neatly on a disk. As files become deleted, holes appear and the data become scattered randomly over the disk surface.



1.3.2 Spooling Spooling is a way of processing data serially. Print jobs are spooled to the printer, because they must be printed in the right order (it would not help the user if the lines of his/her file were liberally mixed together with parts of someone elses file).

During a spooling operation, only one job is performed at a time and other jobs wait in a queue to be processed. Spooling is a form of batch processing. Spooling comes from the need to copy data onto a spool of tape for storage.

It has since been dubbed Simultaneous Peripheral Operation On-Line, which is a pretty lousy attempt to make something more meaningful out of the word `spool'!



1.3.3 System calls An important task of an operating system is to provide black-box functions for the most frequently needed operations, so that users do not have to waste their time programming very low level code which is irrelevant to their purpose.

These ready-made functions comprise frequently used code and are called system calls.

For example, controlling devices requires very careful and complex programming. Users should not have to write code to position the head of the disk drive at the right place just to save a file to the disk.

This is a very basic operation which everyone requires and thus it becomes the responsibility of the OS.

Another example is mathematical functions or graphics primitives. System calls can be thought of as a very simple protocol - an agreed way of asking the OS to perform a service. Some typical OS calls are: read, write (to screen, disk, printer etc), stat (get the status of a file: its size and type) and malloc (request for memory allocation). On older microcomputers, where high level languages are uncommon, system calls are often available only through assembler or machine code. On modern systems and integrated systems like UNIX, they are available as functions in a high level language like C.



1.3.4 Basic command language Commands like dir; list files (DOS)ls ; list files (UNIX)cd; change directorycopy file prn; copy file to printermyprog; execute program `myprog'constitute a basic command language.

Every computer must have such a language (except perhaps the Macintosh - yawn!).

In microcomputer operating systems the command language is often built into the system code, whereas on larger systems (UNIX) the commands are just executable programs like the last example above. The command language deals typically with: file management, process management and text editing.



1.3.5 Filesystem In creating a system to store files we must answer some basic questions. 13 Should the filesystem distinguish between types of files e.g. executable files, text files, scripts. If so how?

One way is to use file extensions, or a naming convention to identify files, like myprog.exe, SCRIPT.BAT, file.txt.

The problem with this is that the names can be abused by users. If one tries to execute a file which is not meant to be executed, the result would be nonsense and might even be dangerous to the point of crashing the system.

One way around this problem is to introduce a protocol or standard format for executable files, so that when the OS opens a file for execution it first checks to see whether the file obeys the protocol.

This method is used for binary files in UNIX, for instance. 13 Protection. If several users will be storing files together on the same disk, should each user's files be exclusive to him or her? 13 Is a mechanism required for sharing files between several users? 13 A hierarchical filesystem is a good starting point for organizing files, but it can be too restrictive. Sometimes it is useful to have a file appear in several places at one time. This can be accomplished with links. A link is not a copy of a file, but a pointer to where a file really is.

By making links to other places in a hierarchical filesystem, its flexibility is increased considerably.
发新帖

最新评论

Aaron-ico 发表于 2009-2-4 23:16:02
1.2硬件 这里我们列出重要硬件的基本概念

1.2.1 CPU

CPU,即中央处理器,是计算机的心脏和灵魂。这是计算机执行机器指令的部件。传统意义上,它只是一个用很多针脚来连接内存和设备的微处理器-通常由大型芯片识别。在现代的机器中,可能有多个CPU并行工作。并且VLSI(超大规模集成技术)已经可以将很多单独的处理器和存储器放到单一的封装中,因此CPU和他的支持芯片在物理意义上变得模糊起来。虽然如此,CPU仍然从逻辑上有别于存储器和设备。CPU是由“时钟”或叫脉冲发生器驱动的。每条指令在一定的“时钟周期”内完成。传统的CPU基于CISC(复杂指令集计算)架构,即单指令消耗一个或多个时钟周期来完成。现在新的趋势是建立RISC(精简指令计算)处理器,旨在利用冗余构造一个更有效指令子集。这样指令简单但执行速度更快,有时能在一个时钟周期完成几个指令。

1.2.2 存储器

主存储器是计算机最重要的资源。由于CPU只能从存储器中进行读写,所以没有程序能离开存储器来运行。存储器有两种:RAM-随机存取存储器,或叫读写存储器,关机后里面的内容将会失。还有一种是ROM-只读存储器,其内容永远不会丢失除非损坏。ROM一般用来储存操作系统中开机时即时需要的最基本的部分,比如硬盘等。

1.2.3 设备

设备的概念包括两部分。它可以是连接机器的硬件单元,也可以是由操作系统定义硬件设备合法接入口的逻辑设备。当用户向逻辑设备定入时,操作系统便调用设备驱动来执行控制硬件的物理操作。例如,当向硬盘写入时,操作系统必须控制读写磁头的运转。当向打印机写入时,操作系统会将消息放置到队列中,并在打印机空闲时响应请求。一些通用逻辑设备有:系统硬盘,键盘,显示器,打印机和音频设备。硬盘和磁带通常叫做二级存储器或者辅助存储器。

1.2.4 中断,捕获,异常

中断是传送到连接中央处理器的硬件信号。这些信号正确地中断CPU当前的任务和请求,花几个时间周期来响应另一个请求。比如,用户按下一个按键从而从产生一个中断。这时CPU必须停止当前任务并且从键盘读入,并将键值放置到缓冲区中以备后面读入,然后返回到刚刚正在进行的任务。其它产生中断的“事件”有:系统时钟周期性产生中断,硬盘设备在他们完成I/O任务之后产生中断,从而可以让计算机监测传感器和探测器。用户程序也同样可以产生“软件中断”以在特殊情况下处理像“除以0”一类的错误。这些在一些操作系统上通常被称为捕获或者异常。中断按水平分级。低级中断具有低优先级而高级中断对应高的优先级,高级中断可以中断低级中断,因此CPU必须能够从几个中断“层”中恢复和中止当前正在进行的任务。这是通过堆和栈实现的。此外,程序通常可以通过设置中断屏蔽,根据自己的意愿选择是否中断那些不想被监听到的中断。屏蔽中断是危险的,因为可能造成数据丢失。因此所有的系统对于大多关键操作都有非屏蔽中断。

1.3 软件

1.3.1 资源管理

为了跟踪系统资源的使用状况,一个操作系统必须有表单说明哪些是空闲资源哪些不是。比如,数据不能被整齐地放在磁盘上。当文件被删除,碎片产生,数据随机分布在磁盘上。

1.3.2 假脱机

假脱机是一种数据串行处理方式。打印任务串行发到打印机上,因为它们必须以一定的顺序打印(当用户文件的每行宽松地和部分他人的文件混合在一起时,它将无法处理)。在假脱机过程中,同一时间里只有一个任务被执行,其他任务在队列中等待被处理。假脱机是批处理的一种形式。它来自将数据复制到缓冲磁带中储存的需要。它一直被称为Simultaneous Peripheral Operation On-Line(外围设备同时联机操作),这是个非常糟糕地企图让spool这个词来得更有意义!

1.3.3 系统调用

操作系统的一个重要是为频繁请求的操作提供黑箱功能,使得用户不用为编写那些与他们的目标无关的低级代码而浪费时间。这些现成的功能包括一些经常使用的编码,被称为系统调用。例如,控制设备,这需要相当谨慎和复杂的程序。用户不用也不必要仅仅为了在硬盘上保存文件而写代码来确定硬盘磁头移动到正确的位置上。这是一个相当基本的操作,每个人都需要因此成为操作系统的职能。另一个例子是数学函数和图形基础命令。系统调用可认为是一个很简单的协议-一个请求操作系统执行服务的通用方法。一些典型的操作系统调用如:read,write(写入屏幕,硬盘,打印机等),stat(如获得一个文件的状态即它的大小和类型)和malloc(请求内在分配)。在老式微机上,高级语言还不普遍,系统调用通常只对汇编语言和机器代码有效。在类似UNIX的现代系统和综合系统上,这些系统调用可以在高级语言在作为函数实现,比如C语言。

1.3.4 基本命令语言

命令,比如dir:列出文件(DOS);ls:列出文件(UNIX);cd:改变路径。copy file prn:将文件复制到打印机;myprog:执行'myprog'程序。构建一套基本命令语言。每个计算机必须具有这种语言(可能除了Mactintosh之外,哎!)。在微机操作系统中,基本命令语言通常是写入到系统代码中,而在较大的系统上(UNIX)命令就像上面的可执行程序那样。命令语言处理典型的如:文件管理,进程管理和文本编辑等操作。

1.3.5 文件系统

建立一个操作系统来存储文件我们必须面对一些基本问题。


文件系统应该区分文件类型吗?如可执行文件,文本文件,脚本。如果是,应该怎么做?其中的一个方法就是使用文件扩展名,或者命名约定来分辨文件,如myprog.exe,SCRIPT.BAT,file.txt。这个方法存在的问题是名字可能被用户滥用。如果有人试图执行一个不可执行的文件,结果将毫无意义甚至是一个使系统崩溃的危险行为。围绕这个问题的一个解决方法是为可执行文件引入或协议或者标准格式,从而当操作系统打开一个文件准备执行时,先检查是否违反协议。例如,这个方法被应用于UNIX二进制文件中。


保护制度,如果多个用户在同一个硬盘上存储文件,每个用户的文件是否应该由他们独占?


有必要在多个用户之间共享文件吗?


分层文件系统是组织文件的好方法,但它的限制太多。有时候它对一个文件同时出现在不同的地方是有益的。这可由链接(links)实现。链接(link)不是一个文件的拷备,而是一个指向文件真正位置的指针。通过在分层文件系统中建立指向其它地方的链接,灵活性相当高。

评分

参与人数 1鲜花 +100 收起 理由
Nicoffee + 100 偶像。。。

查看全部评分

Aaron-ico 发表于 2009-2-4 23:16:42
真不容易,这么多下次排好版再发上来吧,后面我都不知道在哪换行=。=
gaochuandong 发表于 2009-5-1 01:55:47
太高深了,有点看不懂
关闭

站长推荐上一条 /1 下一条


关于我们|免责声明|广告合作|手机版|英语家园 ( 鄂ICP备2021006767号-1|鄂公网安备42010202000179号 )

GMT+8, 2026-4-30 02:10

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表