Professional Documents
Culture Documents
Assignment 1
Sridhar Godavarthy (U32086851)
1.8) Which of the following instructions should be privileged?
a. Set value of timer
c. Clear Memory
e. Turn off interrupts
f. Modify entries in a device-status table
g. Switch from user to kernel mode.
h. Access I/O Device.
1.9) 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.
a. Any new critical data created by the OS would have to be anyway placed on the
writable partition nullifying its use.
b. The operating system can never be updated / patched.
1.18) How do clustered systems differ from multiprocessor systems? What is required
for two machines belonging to a cluster to cooperate to provide a highly available
service?
A) Clustered systems are two or more individual systems coupled together and may
share storage or have a faster interconnect.
Multiprocessor systems on the other hand are much more closely coupled and generally
use shared memory to communicate. The processors generally share the same system
resources.
High availability can be achieved by adding a level of redundancy to the system. A
software known as the cluster software runs on the system and each machine is
monitored ( keep track of process information) by one or more machines. When a
machine fails, the monitoring machine takes up its tasks.
1.20) Consider a computer 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.
A) Asymmetric clustering The nodes can be implemented in the hot standby mode
with one node performing the database operation and the other node monitoring the
1.21) How are network computers different from traditional personal computers?
Describe some usage scenarios in which it is advantageous to use network computers.
A) Personal computers have all the required resources local to the machine and are
capable of handling all requests locally. Network computers have very minimal
resources locally( in some cases- known as dumb terminals- only the memory and a
processor) and a minimalistic operating system too. They depend on a network server
for all their resource requirements.
Systems that have a centralized storage that needs to be shared between several
clients is a good scenario to use such a setup. For example, a database class whose
students need to work on a central database server.
1.22) What is the purpose of interrupts. What are the differences between a trap and an
interrupt? Can traps be generated intentionally by a user program? If so, for what
purpose?
A) Interrupts are used to indicate events ( changes in state, interesting scenarios,
freeing of resources, I/O completions, errors) to the Operating System, which usually
results in a change in the operating system performing an action. Traps are software
generated interrupts, whereas an interrupt is hardware generated.
Yes. Traps can be generated intentionally by user programs All system calls are called
by traps. Also, exception handling mechanisms can generate traps to allow the O/S to
handle errors.
1.26) Consider an SMP system similar to what is shown in figure Illustrate with an
example how data residing in memory could in fact have two different values in each of
the local caches.
A)
Time
Operation
CPU 1 Cache
CPU 2 Cache
Memory Location G
BEGIN
32
T+t
CPU 1 Read G
32
32
CPU 2 Read G
32
32
32
T + 3t
CPU 1 Write G
32
Assume write through caches. Initially both caches do not cache memory location G. At
T + t, the 1st CPU issues a read on G, This causes a miss and fetches the value 32 from
main memory into the cache. At T + 2t, CPU2 issues a read on G which again causes a
miss and fetches the value 32 from main memory. Now, at T + 3t, CPU 1 issues a write
to memory location G. This is a hit and hence the value is updated in cache-1 and also
written back to memory. In the absence of mechanisms to notify the Cache of CPU2 of
its dirty value, the Cache of CPU2 now has a wrong value the two caches have two
different values for the same memory location. This is shown in red at T + 3t
1.27) Discuss, with examples, how the problem of maintaining coherence of cached
data manifests itself in the following processing environments:
a) Single-processor systems In a multitasking environment, this is not very
complicated. Mechanisms should be in place to provide the data from the cache even
when requested from a different process. All other principles of caching remain the
same.
b) Multiprocessor systems As each processor will have its own cache, there must be a
synchronization between the caches of all processors. However, writing back at each
access will cause performance degradation. Instead, each cache must communicate
with the others and when one cache is invalidated, all other caches must be notified.
Another method is to have a central cache control such as a snoopy cache which will
manage the synchronization. Only when the block is being removed from the cache
should the block be written-back ( for ideal caching- but this is seldom the scenario).
c) Distributed systems As each node has its own local memory, caching is not an issue
in this scenario. However, file caching discrepancy is a scenario. To overcome this, any
update to a file in any system will result in updates to all replicas.
Disadvantage For
Advantages:
Build on others ideas
Independent developers,
Students, small businesses
Peer reviewed
Better quality
Community
Competitors
Less expensive
Independent developers,
Students, small businesses
Competitors
Competitors,
Consultants,
Independent
developers
Community
Hackers, Cyber
thieves
Independent developers,
small scale businesses
Competitors
Independent developers,
Students, small businesses
Competitors,
manufacturers of OS
which work on only
their H/W
Easier licensing
Independent developers,
Students, small businesses
Competitors
More support in
developing stage
Independent developers,
Students, small businesses
Independent developers,
Students
Disadvantages:
Comes without warranty
or guarantee
Chances for intellectual
property infringements
Competitors
Small businesses
Competitors, advocates
Small businesses,
Independent
Competitors
Small businesses,
Independent
developers
Competitors
Small Businesses
REFERENCES:
[1] Silberschatz. Galvin and Gagne, Operating System Concepts 7ed, 2004, John Wiley
& Sons Inc.
[2] John L. Hennessy and David A. Patterson, Computer Architecture: A Quantitative
Approach 4ed, 2006, Morgan Kaufmann