1. What are the two main functions of an operating system?
1. An operating system must provide the users with an extended machine, and it must manage the I/O devices and other system resources. To some extent, these are different functions.两个功能:1.管理资源 2.提供抽象。
在资源管理观点中,操作系统的任务是有效地管理系统的各个部分。在扩展的机器观点中,系统的任务是为用户提供比实际机器更便于运用的抽象。这些抽象包括进程,地址空间以及文件。
2. In Section 1.4, nine different types of operating systems are described. Give a list of applications for each of these systems (one per operating systems type).
Mainframe operating system: Claims processing in an insurance company(在保险公司处理索赔)
Server operating system: Speech-to-text conversion service for Siri.
Multiprocessor operating system: Video editing and rendering(视频编辑和渲染)
Personal computer operating system: Word processing application
Handheld computer operating system: Context-aware recommendation system. (上下文感知推荐系统)
Embedded operating system: Programming a DVD recorder for recording TV
注意嵌入式操作系统和Handheld(掌上)操作系统的区别:
Sensor-node operating system: Monitoring temperature in a wilderness area
Real-time operating system: Air traf?c control system
Smart-card operating system: Electronic payment
3. What is the difference between timesharing and multiprogramming systems?(分时和多道的区别)
In a timesharing system, multiple users can access and perform computations on a computing system simultaneously using their own terminals.
Multiprogramming systems allow a user to run multiple programs simultaneously. All timesharing systems are multiprogramming systems but not all multiprogramming systems are timesharing systems since a multiprogramming system may run on a PC with only one user.、
4.To use cache memory, main memory is divided into cache lines, typically 32 or 64 bytes long. An entire cache line is cached at once. What is the advantage of caching an entire line instead of a single byte or word at a time?(cache为什么是按32或64字节读取,而不是按字节读取?)
Empirical evidence shows that memory access exhibits the principle of locality of reference, where if one location is read then the probability of accessing nearby locations next is very high, particularly the following memory locations. So, by caching an entire cache line, the probability of a cache hit next is increased. Also, modern hardware can do a block transfer of 32 or 64 bytes into a cache line much faster than reading the same data as individual words. (
经验证据表明,存储器访问表现出参考局部性的原理,其中如果读取一个位置,则接下来访问附近位置的概率非常高,尤其是以下存储器位置。
因此,通过缓存整个缓存行,接下来缓存命中的概率会增加。
此外,现代硬件可以将32或64字节的块传输到高速缓存行中,比将单个字读取相同的数据快得多。)
5. On early computers, every byte of data read or written was handled by the CPU (i.e., there was no DMA). What implications does this have for multiprogramming?(
5.在早期计算机上,每个读取或写入的数据字节都由CPU处理(即
没有DMA)。
这对多道程序设计有什么影响?
)
The prime reason for multiprogramming is to give the CPU something to do while waiting for I/O to complete. If there is no DMA, the CPU is fully occupied doing I/O, so there is nothing to be gained (at least in terms of CPU utilization) by multiprogramming. No matter how much I/O a program does, the CPU will be 100% busy. This of course assumes the major delay is the wait while data are copied. A CPU could do other work if the I/O were slow for other reasons (arriving on a serial line, for instance)
多道程序设计的主要原因是在等待I / O完成时为CPU提供一些操作。
如果没有DMA,则CPU完全占用I / O,因此通过多道程序无法获得资源(至少在CPU利用率方面)。
无论程序执行多少I / O,CPU都将100%忙碌。
这当然假设主要的延迟是数据被复制时的等待。
如果由于其他原因(例如,到达串行线路)I / O很慢,CPU可以执行其他工作
原文:https://www.cnblogs.com/JasonPeng1/p/11029321.html