OS Chpt. 1 Excercises

OS Chpt. 1 Excercises

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (11)

Section 1

(11 cards)

What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment?

Front

Keeping operating system within fixed time constrains of a real time system Must make sure scheduling schemes of programs doesn't allow response time to exceed time constraint

Back

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?

Front

useful when two or more components need to exchange data, and the components perform transfers at differing speeds. Solve problem by providing buffer of intermediate speed between components. If a component has a data value change, and the datum is also in the cache, the cache must also be updated. This is especially a problem on multiprocessor systems where more than one process may be accessing a datum. A component may be eliminated by an equal-sized cache, but only if: (a) the cache and the component have equivalent state-saving capacity (that is, if the component retains its data when electricity is removed, the cache must retain data as well), and (b) the cache is affordable, because faster storage tends to be more expensive.

Back

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

Front

thee client-server model firmly distinguishes the roles of the client and server. l, the client requests services that are provided by the server. The peer-to-peer model doesn't have such strict roles. In fact, all nodes in the system are considered peers and thus may act as either clients or servers—or both. A node may request a service from another peer, or the node may in fact provide such a service to other peers in the system. Think downloading vs torrenting

Back

Which of the following instructions should be privileged? a. Set value of timer. b. Read the clock. c. Clear memory. d. Issue a trap instruction. e. Turn off interrupts. f. Modify entries in device-status table. g. Switch from user to kernel mode. h. Access I/O device.

Front

a. Set value timer c. Clear memory e. Turn off interrupts f. Modify entries in device-status table h. Access I/O devices Rest can be done in user mode

Back

8 Some CPUs provide for more than two modes of operation. What are two possible uses of these multiple modes?

Front

be used to provide a finer-grained security policy (distinguishing between different types of users rather kernel vs user) Provide different distinctions within kernel code. (think boot manager)

Back

What are the three main purposes of an operating system?

Front

Provide environment for user to execute programs Allocate separate resources of computer to solve problems Control Program: supervise execution of user programs & manage operation and control of input/output devices

Back

Should applications be included for operating systems? Argue No.

Front

Dominating opinion: - Apps should not be part of OS - Performance benefits does not outweigh security vulnerabilities - Leads to bloated system

Back

How does the distinction between kernel mode and user mode function as a rudimentary form of protection (security) system?

Front

Separate access to certain instructions and hardware devices are created. Access could only be access once the CPU is in kernel mode. The distinction between kernel mode and user mode provides a rudimentary form of protection in the following manner. Certain instructions could be executed only when the CPU is in kernel mode. Similarly, hardware devices could be accessed only when the program is executing in kernel mode. Control over when interrupts could be enabled or disabled is also possible only when the CPU is in kernel mode. Consequently, the CPU has very limited capability when executing in user mode, thereby enforcing protection of critical resources.

Back

Should applications be included for operating systems? Argue Yes.

Front

Performance advantages for programs embedded into os, can take advantage of kernel

Back

When is it appropriate for the operating system to forsake this principle and to "waste" resources? Why is such a system not really wasteful?

Front

Single-user systems should maximize use of the system for the user. GUI might "waste" CPU cycles, but optimizes user interaction

Back

Some early computers protected the operating system by placing it in a memory partition that could not be modified by either the user job or the operating system itself. Describe two difficulties that you think could arise with such a scheme.

Front

Data required by OS would need to be stored or passed through unprotected memory and thus be accessible to unauthorized users

Back