You are on page 1of 5

Msc Exam for feature use

Operating system

• What is deadlock and what are the conditions of resource deadlocks?

• What are the prevention methods of deadlocks?

• What is input output buffering?

• What is virtual memory?

• Discuss process and thread?

• Describe the non-preemptive and preemptive scheduling algorithm.

Networking

• What are the merits layered network architecture.

• What does it mean service, standard and protocol?

• List and define application layer protocols.

• List and define guided transmission Medias.

• Define these concepts in their respective layers port number, logical addressing (ip)
and physical addressing (mac).

Data base

• Define 1st, 2nd, 3rd Normalizations.

• Tuples, attribute, cardinality

• Data models

• Define data definition language and data manipulation language.

Software engineering

• Describe the softeware principle divide and concur?

• What is UML?

• Company XYZ wants to develop human resource management system


………………….if u are a software engineer which software process model do you want
use to develop this system? And why?

Write a Programing and data structure using c++ or Java

• What the use of stack

• Implement Linked list

• Sorting
• Class and objects

Answers

What is a deadlock? Deadlock is defined as the permanent blocking of a set of


processes that compete for system resources including database records and
communication lines. Unlike some other problems in multiprogramming systems,
there is no efficient solution to the deadlock problem in the general case.

Deadlock occurs when a set of processes are in a wait state, because each process is
waiting for a resource that is held by some other waiting process. Therefore, all
deadlocks involve conflicting resource needs by two or more processes.

When does deadlock occur?


Examples in textbooks always make deadlock seem more unlikely than it really is, because
on a simple system with just two locks, it takes quite contrived code to occur. But in a
complex application with many locks held and released all over the code, deadlock is a real-
life problem. A couple of quite realistic example scenarios that require related but subtly
different solutions for reasons we'll discuss in a minute:
• You have a single read-write database connection and also a lock used to control
the consistency of some group of tables. For example, imagine you have a Users table
and a Subscriptions table, and whenever you add an item to the Subscriptions table,
you set a Last Subscription Added field on the corresponding row in the Users table.
To make sure the two tables remain in a consistent state, your server application keeps
a lock, which is always acquired around modifications to the two tables. Now,
imagine method 1 acquires the database connection first then attemps to acquire the
lock; meanwhile, method 2 acquires the lock, before wanting to acquire the database
connection. Deadlock will now ensue: method 2 is waiting for the database
connection, which method 1 is sitting hogging. Meanwhile, method 1 is waiting for
the lock, which method 2 is hogging. Neither will ever be able to proceed. If there are
several connections available, then a milder form of temporary deadlock may occur,
while method 2 waits for a connection to become available.
• Your application manages resources (bank accounts, remote documents etc) that
allow data to be transferred from one resource to the other. Each resource has a
lock associated with it, and to perform a transfer, you must acquire the lock for each
resource involved in the transfer. Now, two threads initiate transfers involving the
same two resources. If the two threads are unlucky and attempt to grab the two
resources in different orders, they are liable to deadlock.
Avoiding deadlock
Usually, the simplest and most efficient way to avoid deadlock is to ensure that resources
are always acquired in some well-defined order.
Now, in an example such as our database locking example (1), this ordering could boil down
to a programming policy. So long as all programmers know and apply the policy of
acquiring the locks in some well-defined order, you'll avoid deadlock. For hopefully obvious
reasons, we must release locks in the opposite order to that in which we acquired them, and
should release them in a finally clause:
Virtual memory is a feature of an operating system (OS) that allows a computer to
compensate for shortages of physical memory by temporarily transferring pages of data from
random access memory (RAM) to disk storage.

What is pre-emptive and non-preemptive scheduling?


Answer
Tasks are usually assigned with priorities. At times it is necessary to run a certain task that
has a higher priority before another task although it is running. Therefore, the running task is
interrupted for some time and resumed later when the priority task has finished its execution.
This is called preemptive scheduling.
Eg: Round robin
In non-preemptive scheduling, a running task is executed till completion. It cannot be
interrupted.
Eg First In First Out

Operating system - pre-emptive and non-preemptive scheduling - Jan 07, 2010 at 15:00
PM by Vidya Sagar

What is pre-emptive and non-preemptive scheduling?


Preemptive scheduling: The preemptive scheduling is prioritized. The highest priority process
should always be the process that is currently utilized.
Non-Preemptive scheduling: When a process enters the state of running, the state of that
process is not deleted from the scheduler until it finishes its service time.

NEXT>>
The following are the advantages of a layered architecture:
Layered architecture increases flexibility, maintainability, and scalability. In a Layered
architecture we separate the user interface from the business logic, and the business logic
from the data access logic. Separation of concerns among these logical layers and
components is easily achieved with the help of layered architecture.
Multiple applications can reuse the components. For example if we want a windows user
interface rather than a web browser interface, this can be done in an easy and fast way by just
replacing the UI component. All the other components like business logic, data access and the
database remains the same. Layered architecture allows to swap and reuse components at
will.

Layered architecture enables teams to work on different parts of the application parallely
with minimal dependencies on other teams.

Layered architecture enables develop loosely coupled systems.


Different components of the application can be independently deployed, maintained, and
updated, on different time schedules.

Layered architecture also makes it possible to configure different levels of security to


different components deployed on different boxes. sO Layered architecture, enables you to
secure portions of the application behind the firewall and make other components accessible
from the Internet.
Layered architecture also helps you to test the components independently of each other.

The following are the disadvantages of a layered architecture:

There might be a negative impact on the performance as we have the extra overhead of
passing through layers instead of calling a component directly.

Development of user-intensive applications can sometime take longer if the layering


prevents the use of user interface components that directly interact with the database.

The use of layers helps to control and encapsulate the complexity of large applications, but
adds complexity to simple applications.

Changes to lower level interfaces tend to percolate to higher levels, especially if the relaxed
layered approach is used.
Network architecture is the design of a communications network. It is a framework for the
specification of a network's physical components and their functional organization and
configuration, its operational principles and procedures, as well as data formats used in its
operation.
In telecommunication, the specification of a network architecture may also include a detailed
description of products and services delivered via a communications network, as well as
detailed rate and billing structures under which services are compensated.
The network architecture of the Internet is predominantly expressed by its use of the Internet
Protocol Suite, rather than a specific model for interconnecting networks or nodes in the
network, or the usage of specific types of hardware links.
The following are the disadvantages of a layered architecture:

There might be a negative impact on the performance as we have the extra overhead of
passing through layers instead of calling a component directly.
Development of user-intensive applications can sometime take longer if the layering
prevents the use of user interface components that directly interact with the database.

The use of layers helps to control and encapsulate the complexity of large applications, but
adds complexity to simple applications.
Changes to lower level interfaces tend to percolate to higher levels, especially if the relaxed
layered approach is used.
I've implemented protocols and sat in on a few standards committees to know a little about
each. A protocol specifies the set of rules governing communication between entities;
• a standard is a specification agreed upon and implemented and adopted by an industry
• or vendors;
• a model is simply a well-understood abstract mechanism to reason about things.
• permalink
Divide and conquer
Subject fact
Divide and conquer has definition. The principle of dividing something large into smaller
units, so it can be dealt with more easily
Has benefits
Separate people can work on each part. The original development work can therefore be done
in parallel
An individual software engineer can specialize in his or her component and become expert at
it
Each individual component is smaller, and therefore easier to understand
When one part needs to be replaced or changed, it can hopefully be done without having to
replace or extensively change other parts
is a subtopic of 11.3 - Cost Estimation
is a subtopic of 9.2 - Principles Leading to Good Design
is an instance of design principle
The OSI model is a good place to start to learn more about the differences between physical
and logical addressing. Think of the physical address as the 48-bit MAC address that
manufacturers encode in their network interface cards (NICs). This type of address is unique,
referred to as the Ethernet or hardware address, and cannot be changed but can be spoofed.
The MAC or Ethernet address is associated with Layer 2 (data Link) of the OSI Model.
The logical address is a 32-bit IP address that is not embedded in the network card but it is
assigned to it for the purpose of routing between networks. This type of address operates at
Layer 3 (network) of the OSI Model. The Internet Protocol (IP), in combination with
Transmission Control Protocol (TCP), forms the TCP/IP suite, which is the de facto protocol
(i.e., universal computer language) that connects the network of networks – that is, the
Internet. The OSI Model is a standard developed by the International Standards
Organization (OSI) to provide a blueprint for conformity for software development and
network communications.
A thread is the smallest unit of processing that can be performed in an OS. In most modern
operating systems, a thread exists within a process - that is, a single process may contain
multiple threads.

You might also like