Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

1.

Define the concepts interrupt and trap and explain the purpose of an
interrupt vector.

Interrupt: Interrupt means that during the execution of the program by the
computer, when there is an abnormal situation or special request occurs, the
computer stops the current program and processes the exception processing or
special request, and then returns to the interrupt of the current program after the
processing ends. Continue to execute the original program.
Also, interrupt is asynchronously. It can happen at any time and doesn’t related to
what is the processor doing. Interrupt usually cause by I/O devices or timers.

Trap: It is a synchronous state and is usually executed by a special instruction. Traps


can be repeated by executing programs in the same data and state. For examples
there are invalid memory access or division by zero.

Interrupt vector: Each interrupt source has a corresponding handler. This handler is
called an interrupt service routine and its entry address is called an interrupt vector.
It provides the Interrupt Service Routine or their addresses to the processor for the
interrupt source.

2. How does a computer system with von Neumann architecture execute an


instruction?

The Von Neumann architecture has the following characteristics:


- The data and instructions processed by the computer are always expressed in
binary numbers.
- Instructions and materials are stored in the same storage without distinction.
- Execute each instruction of the program sequentially.

According to Von Neumann's idea, the basis of the operation of the computer should
be like this:
1. Binary.
2. One-dimensional memory
3. Linear execution of the process, that is, only one instruction is executed at a time.
4. Memory can access programs and data.

3. What role do device controllers and device drivers play in a computer


system?

Device controllers:
A device controller is an entity in a computer whose primary responsibility to control
one or more I/O devices to enable data exchange between the I/O device and the
computer. It is the interface between the CPU and the I/O device. It receives
commands from the CPU and controls the operation of the I/O devices to free the
processor from complex device control transactions. The role of the controller is to
control and coordinate the actions of the entire computer.Usually requires the
program counter (PC), instruction register (IR), instruction decoder (ID), timing and
control circuit, and pulse source, interrupt, etc.

Device drivers: Device driver is a software that allows computer and devices to
communicate. It can be said that it is equivalent to the interface of the hardware.
The OS can only control the operation of the hardware device through this interface,
scheduling multiple tasks, accept and process interrupts and manage data transfers.
If the driver of a device is not properly installed, it will not work properly.

4. Why do clustered systems provide what is considered high-availability


service?

A high-availability clustered system is to make the overall service of the cluster as


available as possible, thereby reducing the losses caused by computer hardware and
software error. If a node fails, its backup node will take over its responsibilities in a
matter of seconds. Therefore, for the user, the cluster will never stop.

The main function of high availability cluster software is to automate fault checking
and business switching.

5. Describe an operating system’s two modes of operation.

There are two modes of operation. They are supervision mode and user mode.
Supervision mode: The CPU can access all the data in the memory, including
peripheral devices, such as hard disks, network cards, and CPU can also switch itself
from one program to another. That is, its resource access is not restricted.
User mode: Only limited access to memory, and does not allow access to peripheral
devices, the ability to occupy CPU is deprived, CPU resources can be obtained by
other programs.

6. Define cache, and explain cache coherency.


Cache is a temporary file swap area. The computer put the most commonly used
files from the memory and put them in the cache. Because the cache often uses
RAM, the file will be sent to the hard disk and other storage for permanent storage
after used.
Cache coherency is when a variable in memory is loaded by multiple caches, a CPU
core modifies the value of this variable, and propagate to other caches. Ensure the
consistency of cached shared data between multiple CPU caches.

7. Describe why direct memory access (DMA) is considered an efficient


mechanism for performing I/O.

Direct memory access is a hardware mechanism that allows direct transfer of their
I/O data between peripheral devices and main memory without the involvement of
the system processor. Otherwise, the CPU needs to copy the data for each segment
from the source to the scratchpad and then write them back to the new location.
During this time, the CPU is not available for other jobs. Therefore, using this
mechanism can greatly increase the throughput of communication with the device.

8. Describe why multicore processing is more efficient than placing each


processor on its own chip.

Multicore means there are two or more CPU working together on a same chip.
Therefore, we only need a set of chipsets, a set of storage. Multicore communicate
through the chip internal bus, and shared memory. So that it would take less time
for the execution of the program. In such an architecture, if we run a multi-
threaded program, inter-thread communication will be faster than processors on
sperate chips. Also, the space on the board is small, and the pressure on the layout
and wiring is also small.

9. Describe the relationship between an API, the system-call interface, and


the operating system.

The operating system will share some kernel instructions through some interfaces,
this interface is called a system call. The system call interface provides a single and
less function. We always need more than one interface to manipulate and combine
to achieve the complex function. The application is the program that implements this
function and provides an access point. This access point is API. Therefore,
applications interact with the OS through API.

10. Describe some requirements and goals to consider when designing an


operating system.

There are two goals to consider when designing an OS. The first goal to consider
when designing an OS is efficiency.
The operating system makes full use of the computer's memory, CPU, I / O
equipment and other resources. It also enables the reasonable organization of
computer workflows to further improve system resource utilization and increase
system throughput. The second goal to consider is convenience.
The design of the operating system should try to make the computer system easier
to use. Convenience and effectiveness are the two most important goals when
designing an operating system.

11. Explain why a modular kernel may be the best of the current operating
system design techniques.

The benefit of using the modular kernel is, at the time of booting, the modular
kernel will load only the required kernels. Since, the modular kernel is subdivided
into modules. So, per the need, only the selective kernels will be loaded.
Therefore, the booting time reduces. Similarly, per the application running, the
selective kernel will be loaded and run. If only the small modules are in use, then
the size of the kernel become small and can be loaded easily. New modules can be
generated easily.

12.Distinguish between virtualization and simulation.


Virtualization:
- The faking actions provided by the hardware or the software are called the
virtualization.
- It is an environment in which the tools are act like a real one, and try to fool
the operating systems or the hardware.
- Whatever things happens, the system is not aware of them.
Simulation:
- It is a controlled software environment in which a user can evaluate or
implement the things.
- They are not like a real one.
- They are used by the astronauts to prepare the shuttles.

Part 2: Design Considerations (40 marks)

1. Draw a typical computer organization figure that includes the main


components of von Neumann architecture. Identify each component, and
explain its function and interaction relative to other components. (15 marks)

 Control Unit: It takes care about the correct implementation of the tasks and
their completion time.
 Processing Unit: Computation of info.
 Memory: Info Storage
 Input: To input the info into the computer.
 Output: To out the info from the computer.
Memory and the processing unit use the following registers to communicate:

 Memory Data Register(MDR).


 Memory Address Register(MAR).

Explanation of the components and its functions:


 The processing unit is managed by the control unit.
The control unit takes care about the activities after implemented as FSM.

It processing is a procedural processing and clock signals, IR and the reset signals
are used to control the FSM.

 Between the processor and the I/O interface, the data is being exchanged by
the I/O ports.
 The I/O ports are the points of interface.
 The two types of I/O mapping are as follow:
 Isolated input/output.
 Memory mapped input/output.
 Random access memory is those from which the central processing unit at
any time can able to access the array value.
 The operations performed by the memory are as follows:
 Fetch (fetching the address).
 Store (address, value).

2. Define system call, and list the main types of system calls. Elaborate on how a
system call interacts with a standard C library and hardware under a dual-
mode operating system environment. (10 marks)

System Call: It is a demand made to the kernel by a program which may incorporate
making and executing new procedures, equipment related administrations and
speaking with indispensable kernel administrations. System calls give a critical
interface between a procedure and the operating system. They are otherwise called
kernel calls.

A library or API is given by the systems that cooperate between an operating system
and ordinary projects. On Windows NT, ntdll.dll library has API, which is a piece of
local API, and Unix write systems have API, which is an actualized some portion of C
library like glibc. This furnish system calls with wrapper capacities which uncover a
normal capacity calling tradition for utilizing the system call and make it measured.
The wrapper's primary capacity is to put every one of the ions in the fitting processor
registers which are to be passed to the system. Thusly the library, between the OS
and the application, builds portability. A change to kernel mode isn't caused by the
call to the library work and is ordinarily a subroutine call. Control is exchanged to the
kernel by the real system call as in Unix-like systems, fork and execve system calls
are summoned by fork and execve C library capacities. Making the system call
specifically in the application's code isn't doable.

A trap ought to be gained and the procedure ought to be ended or halted hurriedly if
the client procedure tries to execute a favored direction yet a piece of the operating
system code must be permitted to execute the special guidelines. Two unique
methods of the operation, which are client mode and screen mode, are required for
the CPU to have the capacity to separate between the client procedure and an
operating system code. There is a bit called the mode bit which is added to
equipment sign of the present mode i.e. screen mode (0) or client mode (1). The OS
plays out those operations which the client couldn't execute because of the idea of
special guidelines. This done by the client by asking for OS some assignment and the
kernel at that point influences a system to call to play out the operation. CPU mode
is changed to the system mode before the proper kernel code starts to execute the
operation at whatever point a system call is made or a trap, an intruder, or flag is
created. A short time later, the CPU mode is changed back to the client mode

3. Describe the overall structure of virtual machines, and compare VMware


and JVM. (15 marks)

Virtual Machines (VMs) are what we often call Simulators. Instead of a physical
machine, we use software to emulate hardware so that end users can
manipulate software through such an environment. All software executed in a
virtual machine can only use resources in the virtual machine.

Virtual machines can be roughly divided into System Virtual Machines and
Process Virtual Machines. A system virtual machine is a platform that can
execute an operating system, while a program virtual machine can only execute a
specific program as its name suggests.

Virtual systems will vary depending on the virtual technology. For example,
virtualization technology is divided into Full Virtualization and Para Virtualization,
which affects the choice of hardware resources and operating systems that
virtual machines can use.

There are 4 parts of VM machine:


1) Control Program
2) Conversion Monitor System
3) Remote Spooling Communication System
4) Interactive Problem Control System

For Java programs, it only knows one operating system (or a kind of machine). This
system is called JVM, and for JVM, the bit code file is its executable file! That is, the
file whose name is .class. Ideally, Java programs don't take care of which platform to
implement. Just know how to execute on the JVM. As for how the JVM
communicates with the underlying platform, it is the JVM's own business.

VMware is a "simultaneous" running multiple operating systems on the main


system's platform, just like a standard Windows application. And each operating
system you can perform virtual partitioning and configuration without affecting the
data of the real hard disk. You can even connect several virtual machines with a
network card as a LAN through the network card, which is extremely convenient.

References:
www.wikipedia.com
www.quora.com
www.umanitoba.ca/comp3430/

You might also like