Professional Documents
Culture Documents
==========================
1. `Resource Allocation`
2. `Supervision`
3. `Managing I/O Devices`
**Q 1.2.** We have stressed the need for an operating system to make
efficient use of the computing hardware. When it is appropiate for the
operating system to forsake this principle and to "waste resources"? Why
is such a system not really wasteful?
- **Answer:**
- \*\* Part 1: \*\*
- `It may be appropiate for operating systems to forsake the principle to
make efficient use of the computer hardware and waste resources in case of single-
user systems. In such systems, the use of computer resources must be maximized for
the user.`
- \*\* Part 2: \*\*
- `Such a system is not really wasteful because although a graphical user
interface may waste CPU cycles, but by maximizing the use of the system, it
optimizes the user's interaction with the system.`
**Q 1.3.** What is the main difficulty that a programmer must overcome
in writing an operating system for a real-time environment?
- **Answer:**
`The main difficulty is keeping the operating system within the fixed time
constraints of a real-time system.`
- **Answer:**
- **Part 1: **
- `As per computer architecture, the computer system is categorised into four
major components: application programs, operating system, hardware, and user. The
mail program and web browser belongs to application program, not to operating
system.`
- `Operating system is defined as the program, which is running all the time
on the computer system. But the mail programs and the web browsers do not run all
the time on the system. Hence they cannot be regarded as operating systems.`
- **Part 2: **
- `Operating System is defined as the program which acts as the interface
between the hardware and the computer user, controlling and allocating the
resources, thus they are part of the operating system.`
- `Also, the operating systems generally include all those applications which
are provided by vendors. As many vendors provide mail programs and web browsers
along with operating systems, they are also included in operating systems.`
**Q 1.5. ** How does the distinction between kernel module and user mode
function as a rudimentary form of protection (security) system?
- **Answer:**
- **Kernel Mode: **
- `It is mandatory that certain instructions must be executed only when the
operating system is in kernel mode.`
- `Access to hardware Devices can be done only when the program is executing
in kernel mode.`
- `The privileged instructions can be executed only when the CPU is in kernel
mode.`
- **User Mode: **
- `When the CPU is executing in user mode, its capacity is limited.`
\*\* Q 1.7. \*\* Some early computers protected the operating system by
placing a memory partition that could not be modified by either the user
job or operating system itself. Describe two difficulties that you think
could arise with such a scheme.
- **Answer:**
`By placing the operating system in a memory partition that could not be
modified by either the user job or the operating system itself, the difficulties
are listed below:`
1. `The critical data such as passwords and access control information that are
required by or generated by the operating system would have to be passed through or
stored in unprotected memory slots and would be accessible to unauthotized users.`
\*\* Q 1.8. \*\* Some CPUs provide for more than two modes of operation.
What are two possible uses of these multiple modes?
- **Answer:**
- **Part 1:**
1. `Kernel Mode`
2. `User Mode`<br />
- **Part 2:**
- `Some CPU's have supported **multiple modes** of operation by providing
different distinctions in kernel mode and user mode separately, rather than
distinguishing between just kernel and user mode.`<br />
- **Part 3:**
\*\* Q 1.9. \*\* Timers could be used to compute the current time.
Provide a short description of how this could be accomplished.
- **Answer:** Timers can take the help of a program that uses the
following steps to calculate current time with the help of timer
interrupts:
1. `Sets the timer for some time later than the current time and goes to sleep.`
2. `An interrupt wakes up the program; that is when it updates its local state,
which it uses to keep a record of the number of interrupts it has received by far.`
3. `Then it repeats this process of establishing timer interrupts and updating its
local state when these timer interrupts are raised.`
\*\* Q 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?
- **Part 1: **
- `If the active portions of program and data are placed in a fast small memory,
the average memory access time can be reduced, thus reducing the total execution
time of the program. Such a fast small memory is referred as cache memory.`<br />
- **Part 2: **
- `Caches are useful when two or more components need to exchange data, and the
components perform transfer at different speeds. Caches solve the transfer problem
by providing a buffer of intermediate speed between the components. If the fast
device finds the data it needs in the cache, it need not wait for the slower
device. 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.`<br />
- **Part 3: **
- **Answer:**
Client-Server Model
Peer-To-Peer Model
-----------------------------------------------------------------------------------
---------------------------------------------
-----------------------------------------------------------------------------------
----------------------------------------
`In this model, systems are categorized as client systems.`
`In this model, all nodes are considered peers.`
`Client systems request for services from server systems. Server systems satisfy
request of the client systems.` `Each peer can act as client or
server depending on the operation it is performing.`
`Resources are controlled and available at the server system.`
`Resources are distributed among the peers and are easy to be shared among the
peers.`
`Client-Server model offers greater security than peer-to-peer model as
authentication of users is done at the central server` `Peer-To-Peer model offers
less security than client-server model as there is no central server that
authenticate users.`
`The setup of the client-server model is expensive`
`The setup of peer-to-peer model is less expensive`
`Client server model is difficult to configure`
`Peer-To-Peer model is easy to configure.`
`For large office setups and for organizations where there is sensitive date,
client server model is suggestable.` `At home and for small office
setups, peer-to-peer model is suggestable.`
`Memory management - the system must allocate the memory to several jobs CPU
scheduling - the system must choose among several jobs ready to run.`
- **Answer:**
- **Answer:**
c. Mobile computers
- **Answer:**
2. `Memory Resources: Due to being small in size, the memory devices use in such
computers are also small, thus deteriorating its storage capacity. This makes
memory resource management and important requirement in handheld devices.`
- **Answer:**
`Time sharing system or multitasking is a logical extension of
multiprogramming. In Time sharing, CPU executes multiple jobs by switching among
them. When switches occur frequently, then the user can interact with each program
while it is running. But multitasking and multiprogramming is not possible on
single user.`
`When there are few other users, the task is large, and the hardware is fast,
timesharing makes sense. The full power of the system can be brought to bear on the
user's problem.`
`The problem can be solved faster than on a personal computer. Another case
occurs when lots of other users need resources at the same time. A personal
computer is best when the job is small enough to be executed reasonably on it and
when performance is sufficient to execute the program to the user's satisfaction.`
- **Answer:**
**Part 1:**
**Part 2:**
1. Increase Throughput
- `obviously more work can be done in less time. It is because of
increase of number of processors (the term multiprocessor means to be)`
2. Economy Of Scale
- `The cost of multiprocessor systems is less when compared to equivalent
multiple single-processor systems. It is because the multiple processors in
multiprocessor systems share`
- `Peripherals`
- `Mass Storage`
- `Power Supplies`
3. Increased Reliability
- `Failure of one processor will not halt the system, but slow it down.`
**Part 3:**
- `The solution of "activating a back-up copy and restarting the most recent
check point" in time of system failure is much expensive, since it involves
considerably hardware duplication.`
- **Answer:**
**Part 1:**
`Clustered systems is made up of together of multiple CPUs to accomplish
computational work. Clustered systems differ from multiprocessor systems, however,
in that they are composed of two or more individual systems compiled together. It
shares storage and are closely lined via LAN networking.`
**Part 2:**
`It provides high- availability service i.e., service will continue to be provided
even if one of more systems in the cluster fails. High- availability is generally
obtained by adding a level of redundancy in the system. A layer of cluster software
runs on the cluster nodes. Each node can monitor one or more of the others (over
LAN). If the monitored machine fails, the monitoring machine can take ownership of
its storage and restart the application that were running on failed machine.`
**Q 1.17.**
`Consider a computing cluster consisting of two nodes running a database. Describe
two ways in which the cluster software can manage access to the data on the disk.
Discuss the benefits and disadvantages of each.`
- **Answer:**
**Part 1:**
`Cluster systems gather together multiple CPU's to accomplish computational work.
It differs from parallel system. The cluster computer share storage and are closely
linked via LAN networking. Clustering provides high-availability service; i.e.
service will continue to be provided even when one or more system(s) in the cluster
fail. Clustering can be structured symmetrically or asymmetrically.`
**Part 2:**
`The asymmetric clustering, one machine is hot-stand by mode, while the other is
running the applications. The host-stand by host machines does nothing but monitor
the active server. If that server fails, the hot stand by host becomes the active
server.`
**Part 3:**
`In symmetric mode, two or most hosts are running applications, and they are
monitoring each other. This mode is different, as it uses all the available
hardware. It requires more than one application be available to run.`