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?
- 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 - 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.
- cache needs to do a lot of works, there may be security problems.
- 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.