You are on page 1of 4

Advanced Operating System

Department : IITA Student ID : BIA110004 Name : 哈瓦尼

Chapter 1
1.14 Under what circumstances would a user be better off using a timesharing system than
a PC or a single-user workstation?
Answer:
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.

1.15 Describe the differences between symmetric and asymmetric multiprocessing. What
are three advantages and one disadvantage of multiprocessor systems?
Answer:
System use asymmetric multiprocessing, in which each processor is assigned a specific task.
A boss processor controls the system; the other processors either look to the boss for
instruction or have predefined tasks. This scheme defines a boss–worker relationship. The
boss processor schedules and allocates work to the worker processors.
Systems use symmetric multiprocessing (SMP), in which each processor performs all tasks
within the operating system. SMP means that all processors are peers; no boss–worker
relationship exists between processors.
Multiprocessor systems have three main advantages:
1. Increased throughput. By increasing the number of processors, we expect to get more
work done in less time. The speed-up ratio with N processors is not N, however; rather, it is
less than N. When multiple processors cooperate on a task, a certain amount of overhead is
incurred in keeping all the parts working correctly. This overhead, plus contention for shared
resources, lowers the expected gain from additional processors. Similarly, N programmers
working closely together do not produce N times the amount of work a single programmer
would produce.
2. Economy of scale. Multiprocessor systems can cost less than equivalent multiple single-
processor systems, because they can share peripherals, mass storage, and power supplies. If
several programs operate on the same set of data, it is cheaper to store those data on one
disk and to have all the processors share them than to have many computers with local
disks and many copies of the data.
3. Increased reliability. If functions can be distributed properly among several processors,
then the failure of one processor will not halt the system, only slow it down. If we have ten
processors and one fails, then each of the remaining nine processors can pick up a share of
the work of the failed processor. Thus, the entire system runs only 10 percent slower, rather
than failing altogether.
One disadvantage of multiprocessor systems:
There are multiple processors in a multiprocessor system that share peripherals, memory
etc. So, it is much more complicated to schedule processes and impart resources to
processes.than in single processor systems. Hence, a more complex and complicated
operating system is required in multiprocessor systems.

1.16 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?
Answer:
Clustered systems are typically constructed by combining multiple computers into a single
system to perform a computational task distributed across the cluster. Multiprocessor
systems on the other hand could be a single physical entity consisting of multiple CPUs. A
clustered system is less tightly couple than a multiprocessor system. Clustered systems use
messages to communicate, while processors in a multiprocessor system could communicate
using shared memory.
In order for two machines to provide a highly available service, the state on the two
machines should be replicated and consistently updated. When one of the machines fails,
the other could then takeover functionality.

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:
Consider the following two alternatives: asymmetric clustering and parallel clustering. With
asymmetric clustering, one host runs the database application with the other host simply
monitoring it. If the server fails, the monitoring host becomes the active server. This is
appropriate for providing redundancy. However, it does not utilize the potential processing
power of both hosts.
With parallel clustering, the database application can run in parallel on both hosts.
The difficulty implementing parallel clusters is providing some form of distributed locking
mechanism for files on the shared disk.
1.19 What is the purpose of interrupts? How does an interrupt differ from a trap? Can traps
be generated intentionally by a user program? If so, for what purpose?
Answer:
Interrupt transfers control to the interrupt service routine (ISR) generally, through the
interrupt vector, which contains the addresses of all the service routines. Interrupt
architecture must save the address of the interrupted instruction. Incoming interrupts are
disabled while another interrupt is being processed to prevent a lost interrupt
A trap is a software-generated interrupt caused either by an error or a user request.
Interrupt driven by hardware. Software error or request creates exception or trap. Division
by zero, request for operating system service.
Chapter 2
2.5 What is the purpose of the command interpreter? Why is it usually separate from the
kernel?
Answer :

2.6 What system calls have to be executed by a command interpreter or shell in order to
start a new process?
Answer :

2.7 What is the purpose of system programs?


Answer :

2.10 Why do some systems store the operating system in firmware, while others store it on
disk?
Answer :

2.11 How could a system be designed to allow a choice of operating systems from which to
boot? What would the bootstrap program need to do?
Answer :

2.12 The services and functions provided by an operating system can be divided into two
main categories. Briefly describe the two categories, and discuss how they differ.
Answer :

You might also like