You are on page 1of 5

Annexure

Homework type/no: 1 Course code CSE-316
Student roll no: B48 Section no: c2801

Declaration:
I declare that this assignment is my individual work. I have not copied from any other student’s
work or from any other source except where due acknowledgment is made explicitly in the text,
nor has been written for me another person.
Student’s signature: Yogesh
Part A

1. In a multiprogramming and time sharing environment, several users share the system
simultaneously. This situation can result in various security problems.

Ans:-

a) What are two such problems?

Ans.

1)Stealing or copying a user's files; writing over another program's (belonging to another
user or to the OS) area in memory;

2)Using system resources (CPU, disk space) without proper accounting; causing the
printer to mix output by sending data while some other user's file is printing.

b) Can we ensure the same degree of security in a time shared machine as in a dedicated
machine? Explain your answer.

Ans. No, since any protection scheme devised by a human can also be broken -- and the more
complex the scheme is, the more difficult it is to be confident of its correct implementation.

But we can try protecting using following measures:-

The same degree of security in the time sheared mechanism first their USBs should be disabled
through the server. Their ICMP Protocol should also be disabled, so that there will no
communication among the users.

2. Under what circumstances would a user be better off using a time sharing system
rather than a PC or single user workstation?

Ans:- When there are few other users, the task is large, and the hardware is fast, time-sharing
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.

There are benefits and downsides to every type of system. In a mainframe-style system, all
resources are available to the process being run, which benefits large data crunching operations
(like payroll). The downside to a mainframe-style system is that only one process can run at a
time in each virtual machine.
In a server-style system, all resources are shared among all processes. If a process "runs away"
by using more processes than it should, then the other processes suffer, which the end-user sees
as a server responding very slowly and/or "timing out". The upside to a server-style system is
that you can serve web pages to thousands of people, while at the same time handling thousands
of pieces of email.

3. In the designing of the operating system there are two approaches modular kernel and
layered approach? How are they different?

Ans.:- When lots of other users need resources at the same time. A time-sharing system (what we
call a server now days) provides many people the opportunity to use the system. Technically,
even a standard PC is a time-sharing system, because you can run many different programs on it
at a time (think Browser, iTunes, Anti-Virus, etc.). 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.

Modular kernels:-

1. The modules for a particular kernel are stored in /lib/modules/kernel-version.

2. The best components to modularise are ones not required at boot time, for example peripheral
devices and supplementary file systems.

3. Kernel modules are controlled by utilities supplied by the modules package

The following is a list of 'user space' commands that can be used to control kernel modules.
Notice that we will spend more time on the depmod, modprobe and modinfo commands below.

Lsmod: list currently loaded modules
Rmmod: remove a single module
Insmod: insert a single module
Depmod: create the database of module dependencies modules.dep

layered approach:-
1. The main advantage of the layered approach is modularity. The layered are selected such that
each uses function and services of only lower level layers. This approach simplifies debugging
and system verification.
2. D layers r selected such that each uses function &services of only lower levels .
It simplifies debugging and system verification.
3.System is easier to debug and modify
changes affect only limited portions of the code and the programmer

Part B
4. There is guest operating system and a host operating system like VMware? List all the
factors in choosing the host operating system?

Ans:- A guest operating system provides its services by mapping them onto the functionality
provided by the host operating system. A key issue that needs to be considered in choosing the
host operating system is whether it is sufficiently general in terms of its system-call interface in
order to be able to support the functionality associated with the guest operating system.

It also depends on factor like:

1)PC Hardware 2)Memory 3) Display 4) Disk Drives 5)Local Area Networking (Optional)
6)Host Operating System

5.The kernel is responsible for a action with the processes. Search through the action of
kernel and describe what is the action?

Ans:-

A guest operating system provides its services by mapping them onto the functionality provided
by the host operating system. A key issue that needs to be considered in choosing the host
operating system is whether it is sufficiently general in terms of its system-call interface in order
to be able to support the functionality associated with the guest operating system. In computing,
the kernel is the central component of most computer operating systems; it is a bridge between
applications and the actual data processing done at the hardware level. The kernel's
responsibilities include managing the system's resources (the communication between hardware
and software components). Usually as a basic component of an operating system, a kernel can
provide the lowest-level abstraction layer for the resources (especially processors and I/O
devices) that application software must control to perform its function. It typically makes these
facilities available to application processes through inter-process communication mechanisms
and system calls.

6. Considering both the system level and the programmer level.

Ans:-

Consider the advantage and disadvantage of the following structure.

a) Synchronous and asynchronous communication- A benefit of symmetric
communication is that it allows a rendezvous between the sender and receiver. A
disadvantage of a blocking send is that a rendezvous may not be required and the
message could be delivered asynchronously; received at a point of no interest to the
sender. As a result ,message-passing systems often provide both forms of
synchronization.

b) Automatic and explicit buffering - Automatic buffering provides a queue with
indefinite length ; thus ensuring the sender will never have to block while waiting to
copy a message. There are no specifications how automatic buffering will be
provided; one scheme may reserve sufficiently large memory where much of the
memory is wasted. Explicit buffering specifies how large the bufferis. In this
situation, the sender may be blocked while waiting for available space in the queue.
However, it is less likely memory will be wasted with explicit buffering.

c) Send by copy and send by reference – Send by copy does not allow the receiver to
alter the state of parameter; send by reference does not allow it A benefit of send by
reference is that it allows the programmer to write a distributed version of a
centralized application Java’s RMI provides both, however passing a parameter by
reference requires declaring the parameter as a remote object as well.

d) Fixed-sized and variable-sized messages - The implications of this are mostly related
to buffering issues; with fixed-size messages, a buffer with a specific size can hold a
known number of messages. The number of variable-sized messages that can be held
by such a buffer is unknown. Consider how Windows 2000handles this situation:
with fixed-sized messages (anything< 256bytes), the messages are copied from the
address space of the sender to the address space of the receiving process. Larger
messages (i.e. variable-sized messages) use shared memory to pass the message.