【操作系统】Operating System Concepts上机作业2

1.10 Give two reasons why caches are useful. What problems do they solve? What problems do they cause? If a cache can be made as large as the device for which it is caching (for instance, a cache as large as a disk), why not make it that large and eliminate the device?

  1. Caches can be installed to improve performance where a large disparity in access time or transfer rate exists between two components.
    Information is normally kept in some storage system (such as main memory). As it is used, it is copied into a faster storage system—the cache
  2. The data in the cache must be kept consistent with the data in the components. If a component has a data value change, and the datum is also in the cache, the cache must also be updated.
  3. cache needs to do a lot of works, there may be security problems.
  4. Some systems automatically archive old file data from secondary storage to tertiary storage.Faster storage is expansive, the cache needs to be affordable.

1.11 Distinguish between the client – server and peer-to-peer models of distributed systems.

  • client – server: provides an interface to which a client can send a request to perform an action (for example, read data). In response, the server executes the action and sends the results to the client. A server running a database that responds to client requests for data is an example of such a system.
  • peer-to-peer: clients and servers are not distinguished from one another. Instead, all nodes within the system are considered peers, and each may act as either a client or a server, depending on whether it is requesting or providing a service.

1.12 In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems.

a.What are two such problems?

memory-addressing hardware ensures that a process can execute only within its own address space. The timer ensures that no process can gain control of the CPU without eventually relinquishing control. Device-control registers are not accessible to users, so the integrity of the various peripheral devices is protected.

b.Can we ensure the same degree of security in a time-shared machine as in a dedicated machine? Explain your answer.

In some circumstances, we wish to distinguish among sets of users rather than individual users. Group functionality can be implemented as a system-wide list of group names and group identifiers. A user can be in one or more groups, depending on operating-system design decisions. The user’s group IDs are also included in every associated process and thread.
In the course of normal system use, the user ID and group ID for a user are sufficient. However, a user sometimes needs to escalate privileges to gain extra permissions for an activity.
The process runs with this effective UID until it turns off the extra privileges or terminates.

1.29 Describe some distributed applications that would be appropriate for a peer-to-peer system.

  • Skype :It allows clients to make voice calls and video calls and to send text messages over the Internet.
  • Napster: used a centralized server maintained an index of all files stored on peer nodes in the Napster network, the actual exchange of files took place between the peer nodes.
  • Gnutella: used a technique similar to the second type: a client broadcasted file requests to other nodes in the system, and nodes that could service the request responded directly to the client.

1.30 Identify several advantages and several disadvantages of open-source operating systems. Include the types of people who would find each aspect to be an advantage or a disadvantage.

Advantages:

  • Including a community of interested (and usually unpaid) programmers who contribute to the code by helping to debug it, analyze it, provide support, and suggest changes.
  • open-source code is more secure than closed-source code because many more eyes are viewing the code.
  • hat bugs tend to be found and fixed faster owing to the number of people using and viewing the code.
  • Revenue can be generated through support contracts and the sale of hardware on which the software runs
    Disadvantages:
  • open-source code has bugs
  • Some companies may think it’s harmful to their business interests.

2.1 What is the purpose of system calls?

System calls provide an interface to the services made available by an operating system, it allow user-level processes to request services of the operating systems.

2.2 What are the five major activities of an operating system with regard to process management?

The five major activities are:

  • The creation and deletion of both user and system processes
  • The suspension and resumption of processes
  • The provision of mechanisms for process synchronization
  • The provision of mechanisms for process communication
  • The provision of mechanisms for deadlock handling

2.3 What are the three major activities of an operating system with regard to memory management?

  • Keeping track of which parts of memory are currently being used and who is using them.
  • Deciding which processes(or parts of processes) and data to move into and out of memory
  • Allocating and deallocating memory space as needed

1.1 What are the four components of a computer system?

  • the hardware CPU, memory, I/O devices
  • the operating system,Controls and coordinates use of hardware among various applications and users
  • the application programs, define the ways in which the system resources are used to solve the computing problems of the users
  • the users ,People, machines, other computers

1.2 Provide at least resources the operating system allocates.

CPU time, memory space, file-storage space, I/O devices, and so on.

1.4 What do mobile operating systems often include in addition to the core kernel?

Many developers are now designing applications that take advantage of the unique features of mobile devices, such as global positioning system (GPS) chips, accelerometers, and gyroscopes.
An embedded GPS chip allows a mobile device to use satellites to determine its precise location on earth.
An accelerometer allows a mobile device to detect its orientation with respect to the ground and to detect certain other forces, such as tilting and shaking.

1.5 What is an interrupt?

Interrupts are an important part of a computer architecture. Each computer design has its own interrupt mechanism, but several functions are common.
When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a fixed location. The fixed location usually contains the starting address where the service routine for the interrupt is located. The interrupt service routine executes; on completion, the CPU resumes the interrupted computation.
A mechanism by which other modules may interrupt the normal processing of processor.

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
操作系统是计算机系统中最基本的软件之一,它负责管理和协调计算机硬件资源,提供更高层次的抽象,使用户能够方便地使用计算机。操作系统的主要功能包括进程管理,内存管理,文件系统管理和设备管理。 进程管理是操作系统的核心功能之一。它负责创建、终止和调度进程,以及管理进程之间的通信和同步。通过进程管理,操作系统可以控制程序的执行顺序,保证多个程序可以同时运行,并且能够相互合作。 内存管理是操作系统的另一个重要功能。它负责管理计算机的内存资源,将内存划分为多个区域,为进程分配内存空间,并且提供内存的分配和回收功能。内存管理还负责虚拟内存的实现,通过将部分程序从内存中换出到磁盘上的交换区,实现了对内存资源的合理利用。 文件系统管理是操作系统的一个关键组成部分。它提供了一种组织和存储文件的方式,使得用户可以通过文件名来访问和管理文件。文件系统管理还包括文件的创建、删除、复制和移动等操作,以及对文件的读写权限的管理。 设备管理是操作系统的另一个重要功能。它负责管理计算机的输入输出设备,包括硬盘、键盘、鼠标、打印机等。设备管理还负责调度和控制设备的访问,以保证多个设备可以同时进行操作,并且能够高效地响应用户的请求。 操作系统还提供了用户接口,使用户能够方便地与计算机进行交互。用户可以通过命令行界面或者图形界面来操作计算机,执行各种任务,如运行程序、管理文件、配置系统等。 总而言之,操作系统是计算机系统中的一个关键组成部分,它负责管理和协调计算机的各种资源,为用户提供一个方便、高效和可靠的计算环境。操作系统的功能包括进程管理、内存管理、文件系统管理和设备管理,通过这些功能,操作系统可以实现对计算机的全面控制和管理。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值