Professional Documents
Culture Documents
Operating Systems CHAPTER 1 COMPLETE SOLUTION MADE BY ABHISHEK KUMAR
Operating Systems CHAPTER 1 COMPLETE SOLUTION MADE BY ABHISHEK KUMAR
ABHISHEK KUMAR
1.1. - 1.17
Answer:
i. Resource Allocation
ii. Supervision
iii. 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: **
** Part 2: **
Answer: The main difficulty is keeping the operating system within the fixed
time constraints of a real-time system.
Q 1.4. Keeping in mind the various definitions of operating system, consider whether
the operating system should include applications such as web browsers and mail
programs. Argue both that it should and it should not, and support your answers.
Answer:
o **Part 1: **
o **Part 2: **
Answer:
o **Kernel Mode: **
o **User Mode: **
Answer:
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:
i. 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.
ii. The operating system could never be updated or patched, since it is not
modifiable or accessible by the user or the operating system itself.
** Q 1.8. ** Some CPUs provide for more than two modes of operation. What are two
possible uses of these multiple modes?
Answer:
o Part 1:
a. Kernel Mode
b. User Mode
o Part 2:
o Part 3:
a. One possibility would be to provide different distinctions within
kernel code. For example, a specific code would allow USB devices
could allow USB devices to driver to run. This would mean that
that USB devices could be serviced without having to switch to
kernel mode, there by essentially allowing USB device drivers to
run in a quasi-user/kernel mode.
b. Second possibility would be to provide different distinctions
within user mode. Multiple user modes could be used to provide a
finer-grained security policy. Perhaps users belonging to the
same group could execute each others code. When the machine was
in this mode, a member of the group could run belonging to anyone
else in the group.
** 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:
i. Sets the timer for some time later than the current time and goes to
sleep.
ii. 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.
iii. 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.
**Part 2: **
o 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.
**Part 3: **
Answer:
In this model, systems are categorized as client systems. In this model, all nodes are cons
Client systems request for services from server systems. Each peer can act as client or se
Server systems satisfy request of the client systems. operation it is performing.
Client-Server model offers greater security than peer-to- Peer-To-Peer model offers less se
peer model as authentication of users is done at the central server model as there is no centr
server authenticate users.
The setup of the client-server model is expensive The setup of peer-to-peer model i
For large office setups and for organizations where there is At home and for small office setu
sensitive date, client server model is suggestable. is suggestable.
o Answer:
Memory management - the system must allocate the memory to several jobs
CPU scheduling - the system must choose among several jobs ready to run.
o Answer:
We can't ensure the same degree of security in a time-shared machine as
we have in a dedicated machine, because in a time-shared machine there
are several jobs simultaneously in memory. Since any protection scheme
devised by humans can inevitably break by a human, more complex the
scheme.
Answer:
Answer:
Answer:
i. Answer:
i. Answer:
Part 1:
Part 2:
Part 3:
Answer: