Dimploma Open Questions

You might also like

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

Contents

MATHS 4
01. The definite and indefinite integrals: application and calculating
techniques. 4
02. Taylor polynomial and series. 4
03. Methods of solving systems of linear equations and the number of
solutions. 4
04. Eigenvalues of matrix or linear transformation and their applications in IT.
4
05. Graphs and their types. Methods of representing graphs. 4
06. Binary relations, properties and methods of representation. 4
07. The principle of mathematical induction. 4
08. Bayes’ theorem. 4
09. Statistical hypothesis testing. 4
10. Determination of confidence intervals. 4
DATABASES 5
11. Essential features of relational databases. 5
12. Essential elements and importance of entity relation diagrams and
principles of accurate database schema design. 5
13. A concurrency mechanism of multiple users work in the database
management system. 5
14. Basic objects, constructs and applications of SQL. 5
15. Basic principles of query optimization, including the types and importance
of indexes in databases. 5
COMPUTER TECHNIQUES AND ARCHITECTURE 6
16. Neumann’s architectural model vs. Turing’s machine computational model,
and their role in IT.
17. Boolean logic and its application in computer hardware. 6
18. Binary notation of integers, floating- point notation of real numbers,
computer arithmetic. 6
19. Computational efficiency measures of processors, computer memory and
computing systems. 6
20. Moore’s Law and its implications in the context of hardware development. 6
ALGORITHMS AND DATA STRUCTURES 7
21. Estimation of algorithmic complexity and complexity class of algorithmic
problems. 7
22. Major types of search and sorting algorithms: review and applications. 7
23. Characteristics and applications of the basic data structures: stack, queue,
priority queue, Find-Union structure, dictionary. 7
24. Binary and n-ary trees in algorithmics. Characteristics, implementation
methods and applications. 7
25. Recursive algorithms vs. iterative algorithms: comparison and the outline
of essential design objectives. 7
PROGRAMMING METHODS, KEY ISSUES 8
26. Object-oriented design and operating memory management in Java and
C++. 8
27. The role of classes, interfaces and mixins in programming on the basis of
Java. 8
28. The concept of inheritance on the basis of Java and C++. 8
29. The essence and application of polymorphism on the basis of Java and C+
+ 8
30. The use of arrays and other data structures in Java and C++. Java
Collections Framework. 8
31. Concurrent programming: mechanisms and tools on the basis of Java and
C++. 8
32. Parameterized types and methods (generics) in Java. Templates in C++. 8
33. Lambda expressions and functional interfaces in Java. 8
34. Stream processing in Java (on the basis of java.util.stream package). 8
35. Tools for the input/output operation programming in Java. 8
SOFTWARE ENGINEERING 9
36. Software development project management - types of activities, the choice
of methodology and non-technical context. 9
37. UML (Unified Modeling Language) - its features and its support for various
data models. 9
38. Design patterns and programming frameworks - characteristics, examples
and applications. 9
39. Software quality assurance and software testing - standards, methods and
criteria. 9
40. Software requirements - their kinds, their specification methods and their
role in the software development process. 9
COMPUTER NETWORKS 10
41. Application layer services and protocols on the basis of the HTTP. 10
42. Transport layer services on the basis of the TCP. 10
43. Network layer routing protocols on the basis of the OSPF protocol. 10
44. Data link layer services on the basis of the Ethernet or the 802.11 protocol
family (WiFi). 10
45. Information security methods in e-Banking. 10
MULTIMEDIA 11
46. Colour models. 11
47. Shaders. 12
48. Compression techniques in MPEG standards. 12
49. Aliasing. How to avoid aliasing? Aliasing vs. sampling rate. 13
50. Human-Computer Interaction (HCI): Nielsen-Molich heuristics. 14
FUNDAMENTALS OF ELECTRONICS AND DIGITAL TECHNOLOGY 15
51. Basic passive element implementations (resistors, capacitors, coils) 15
52. RC low-pass filter. Filter’s cut-off frequency and bandwidth. 16
53. Harvard architecture vs von Neuman architecture. 16
54. Methods of event handling in a microcontroller. 16
55. Common communication interfaces in a microcontroller. 16
OPERATING SYSTEMS 17
56. Classification of operating systems. 17
57. Process and thread scheduling in operating systems. 18
58. Process and thread synchronization in computer programs and its support
by computer systems and operating systems. 19
59. Operating memory management mechanisms used in operating systems.
19
60. Virtual memory mechanism: pros and cons. 20
Questions completed
1 MATHS V 21 ASD P 41 SKJ V

2 P 22 Misha 42 V

3 V 23 P 43 V

4 V 24 P 44 V

5 V 25 P 45 V

6 V 26 Misha 46 MUL P
Java/C++

7 V 27 Misha 47 P

8 V 28 Misha 48 P

9 P 29 Misha 49 P

10 P 30 Misha 50 P

11 DB Misha 31 Misha 51 SYC P

12 Misha 32 Misha 52 P

13 Misha 33 Misha 53 V

14 Misha 34 Misha 54 P

15 Misha 35 Misha 55 P

16 TAK V 36 UML V 56 SOP P

17 Misha 37 V 57 P

18 Misha 38 V 58 P

19 Misha 39 V 59 P

20 Misha 40 V 60 P
MATHS
01. The definite and indefinite integrals: application and calculating techniques.

definite integrals - definite integral of f(x) is a number and represents


the area under the curve f(x) from x=a to x=b.

indefinite integrals - indefinite integral of f(x) is a function and answers


the question, "What function when differentiated gives f(x)?"

Integration calculating techniques -

Integration by parts - useful in evaluating indefinite integrals that do


not fit the basic formulas. You may consider this method when the
integrand is a single transcendental function or a product of an algebraic
function and a transcendental function. The basic formula for integration
by parts:

where u and v are differential functions of the variable of integration.

A general rule is to first choose dv as the most complicated part of the integrand that can be
easily integrated to find v. The u function will be the remaining part of the integrand that will
be differentiated to find du. The goal of this technique is to find an integral, ∫ v du, which is
easier to evaluate than the original integral.

Substitution - reverse chain rule - useful in evaluating indefinite


integrals that do not seem to fit the basic formulas. The inside function of
the composition is usually replaced by a single variable (often u). The
purpose in using the substitution technique is to rewrite the integration
problem in terms of the new variable so that one or more of the basic
integration formulas can then be applied.

Partial fraction expansion/decomposition - is an operation that


consists of expressing the fraction as a sum of a polynomial (possibly
zero) and one or several fractions with a simpler denominator. This
technique provides algorithms for various computations with rational
functions, including the explicit computation of antiderivatives, Taylor
series expansions, inverse Z-transforms, and inverse Laplace transforms.

Integration using trigonometric identities - allows the integrand to


be written in an alternative form which may be more amenable to
integration. On occasions a trigonometric substitution will enable an
integral to be evaluated.
Trigonometric substitution - is the substitution of trigonometric
functions for other expressions. In calculus, trigonometric substitution is a
technique for evaluating integrals. Moreover, one may use the
trigonometric identities to simplify certain integrals containing radical
expressions.

Numerical Integration - can generally be described as combining


evaluations of the integrand to get an approximation to the integral. The
integrand is evaluated at a finite set of points called integration points
and a weighted sum of these values is used to approximate the integral.
02. Taylor polynomial and series.

In mathematics, the Taylor series of a function is an infinite sum of terms


that are expressed in terms of the function's derivatives at a single point.

The Taylor series of a real or complex-valued function (function that


consists of real or complex values) f (x), is the power series

In the more compact sigma notation, this can be written as

where f(n)(a) denotes the nth derivative of f evaluated at the point a. (The derivative of order
zero of f is defined to be f itself and (x − a)^0 and 0! are both defined to be 1.)

When a = 0, the series is also called a Maclaurin series.

Applications of Taylor Series:

● Mainly usage is to approximate the solution of the differential


equations that are difficult or impossible to solve, around the
desired point. The level of approximation is dependent on n value,
as the longer the Taylor polynomial is, the more exact will be the
approximation.
● Used to simplify the determination of infinite sums
● Used in physics to simplify the solution of complex problems that
are based on differential equations
● Used in calculating limits for simplification
03. Methods of solving systems of linear equations and the number of solutions.

A linear equation is an equation in which the highest power of the


variable is always 1. The standard form of a linear equation in one
variable is of the form Ax + B = 0. Here, x is a variable, A is a coefficient
and B is constant. The standard form of a linear equation in two variables
is of the form Ax + By = C. Here, x and y are variables, A and B are
coefficients and C is a constant.

The 6 most common methods of solving a linear equation:

Graphical Method (3 solutions) - procedure of solving a system of


simultaneous linear equations into variables by drawing the graph.

Graph of a linear equation is a line. Coordinates of each point on the line


is a solution to the equation. For a system of simultaneous linear
equations, we will graph two lines. Then we can see all the points that are
solutions to each equation. And, by finding all the points that the lines
have in common, we'll find the solution to the system. When we solve a
system of two linear equations represented by a graph of two lines in the
same plane, there are three possible cases.

Case 1 - If the lines intersect at a point, then the given system has a
unique solution given by the coordinates of the point of intersection.

Case 2 - If the lines are parallel, then the given system of equations is
inconsistent i.e., it has no solution.

Case 3 - If the lines are coincident, then the system is consistent and has
infinitely many solutions. In this case, every solution of one of the
equations is a solution of the system.
Elimination Method (3 solutions) - you either add or subtract the
equations to get an equation in one variable.

- When the coefficients of one variable are opposites - you add the
equations to eliminate a variable;
- when the coefficients of one variable are equal - you subtract the
equations to eliminate a variable.
Substitution Method (3 solutions) - works by solving one of the
equations (you choose which one) for one of the variables (you choose
which one), and then plugging this back into the other equation,
"substituting" for the chosen variable and solving for the other.

Step 1 : First, solve one linear equation for y in terms of x ( or if it's


easier, you can start by solving an equation for x in terms of y, – no
difference)

Step 2 : Then substitute that expression for y in the other linear equation.
You'll get an equation in x.

Step 3 : Solve this, and you have the x -coordinate of the intersection.

Step 4 : Then plug in x to either equation to find the corresponding y -


coordinate.
Cross Multiplication Method - we multiply the numerator of one
fraction to the denominator of other and denominator of the first term to
the numerator of another term.
Matrix Method - similar to elimination method

Determinants Method - method which uses determinants.

Matrix is an array of many numbers.

Determinant is a square array of numbers or variables enclosed between


vertical lines. Difference between determinant and matrix - determinant
has a numerical value, when matrix does not.

Determinant can be viewed as a function whose input is a square matrix


(a matrix with the same number of rows and columns) and whose output
is a number. The determinant of a 1×1 matrix is that number itself.
04. Eigenvalues of matrix or linear transformation and their applications in IT.

Eigenvalues - a special set of numbers associated with a linear system


of equations (i.e., a matrix equation). An eigenvalue is a number, telling
you how much variance there is in the data in that direction.

Eigenvalues of matrix - a square matrix A of order n will not have more


than n eigenvalues. So the eigenvalues of D are a, b, c, and d, i.e. the
entries on the diagonal. This result is valid for any diagonal matrix of any
size. So depending on the values you have on the diagonal, you may have
one eigenvalue, two eigenvalues, or more.

Many problems present themselves in terms of an eigenvalue problem:

A·v=λ·v

In this equation A is an n-by-n matrix, v is a non-zero n-by-1 vector and


λ is a number. Any value of λ for which this equation has a solution is
known as an eigenvalue of the matrix A. The vector, v, which corresponds
to this value is called an eigenvector.

The eigenvalue problem can be rewritten as

A·v-λ·v=0

A·v-λ·I·v=0

(A-λ·I)·v=0

If v is non-zero, this equation will only have a solution if |A-λ·I|=0

This equation is called the characteristic equation of A, and is an nth order


polynomial in λ with n roots. These roots are called the eigenvalues of A.
We will only deal with the case of n distinct roots, though they may be
repeated. For each eigenvalue there will be an eigenvector for which the
eigenvalue equation is true.
Eigenvalues of linear transformation -

How to find the eigenvalue of a linear transformation:

Let T:V→V be a linear transformation from a vector space V to itself.

We say that λ is an eigenvalue of T if there exists a nonzero vector v∈V such that T(v)=λv.

For each eigenvalue λ of T, nonzero vectors v satisfying T(v)=λv is called


eigenvectors corresponding to λ.
Applications in IT of Eigenvalues of matrix or linear
transformation:

Eigenvalues and eigenvectors of a system are extremely important in


physics and engineering, where it is equivalent to matrix diagonalization
and is used in such common applications as stability analysis, the physics
of rotating bodies, and tiny motions of vibrating systems. Eigenvalues are
mathematical tools used in a wide-range of applications. They are used to
solve differential equations, harmonics problems, population models, etc.
In Chemical Engineering they are mostly used to solve differential
equations and to analyze the stability of a system.
05. Graphs and their types. Methods of representing graphs.

Graph is a set of edges and vertices.

Graph can be represented in the form of matrix.

Types of graphs in discrete math -

Null graph (also called an empty graph) - a graph in which there are no
edges between any of its vertices.

Weighted graph: A graph in which weights, or numerical values, are


assigned to each of the edges. Mary's graph is a weighted graph, where
the distances between the cities are the weights of the edges.

Directed graph: A graph in which the edges are directed by arrows,


indicating that the relationship, represented by the edge, only applies
from one vertex to the other, but not the other way around. In other
words, if a directed edge has an arrow from A to B, A is related to B, but
B is not related to A.

Undirected graph: A graph whose edges are not directed. Mary's graph
is an undirected graph, because the routes between cities go both ways.

Connected graph - a graph in which there is a path of edges between


every pair of vertices in the graph. Mary's graph is a connected graph,
since there is a way to get from every city on the map to every other city.

Disconnected graph: A graph in which the path of edges does not


always connect every vertex.

Bipartite graph: A graph that can be split into two sets of vertices such
that edges only go between sets, not within them.

Simple graph: An undirected graph in which there is at most one edge


between each pair of vertices, and there are no loops, which is an edge
from a vertex to itself.

Multi-graph: A graph in which there are multiple edges between any pair
of vertices or there are edges from a vertex to itself, also called a loop.

Planar graph: A graph that can be drawn so that all of the edges of the
graph do not cross each other.

Nonplanar graph: A graph that is not a planar graph. In other words, a


graph that cannot be drawn without at least one pair of its edges
crossing.
Methods of representing graphs - using 3 data structures:

adjacency matrix, adjacency list, adjacency set, Incidence matrix.

Adjacency matrix can be thought of as a table with rows and columns.


The row labels and column labels represent the nodes of a graph. An
adjacency matrix is a square matrix where the number of rows, columns
and nodes are the same. Each cell of the matrix represents an edge or the
relationship between two given nodes. For example, adjacency matrix Aij
represents the number of links from i to j, given two nodes i and j.

The adjacency matrix for a directed graph:

observe that it is a square matrix in which the number of rows, columns


and nodes remain the same (5 in this case). Each row and column
correspond to a node or a vertex of a graph. The cells within the matrix
represent the connection that exists between nodes. Since, in the given
directed graph, no node is connected to itself, all cells lying on the
diagonal of the matrix are marked zero. For the rest of the cells, if there
exists a directed edge from a given node to another, then the
corresponding cell will be marked one else zero.

The adjacency matrix for a undirected graph:

A is connected to B, but B is connected to A as well. Hence, both the cells


i.e., the one with source A destination B and the other one with source B
destination A are marked one. This suffices the requirement of an
undirected edge. Observe that the second entry is at a mirrored location
across the main diagonal.
The adjacency matrix for a weighted graph:

cells are marked with edge weights instead of ones. The weight assigned
to the edge connecting nodes B and D is 3. Hence, the corresponding cells
in the adjacency matrix i.e. row B column D and row D column B are
marked 3.

The adjacency matrix of an empty graph is a zero matrix.

Adjacency list - every vertex is represented as a node object. The node


may either contain data or a reference to a linked list. This linked list
provides a list of all nodes that are adjacent to the current node. Consider
a graph containing an edge connecting node A and node B. Then, node A
will be available in node B’s linked list.
Adjacency list enables faster search process in comparison to adjacency
matrix. However, it is not the best representation of graphs especially
when it comes to adding or removing nodes. For example, deleting a node
would involve looking through all the adjacency lists to remove a
particular node from all lists.

Adjacency set - is quite similar to adjacency list except for the difference
that instead of a linked list; a set of adjacent vertices is provided.
Adjacency list and set are often used for sparse graphs with few
connections between nodes. Contrarily, adjacency matrix works well for
well-connected graphs comprising many nodes.

Incidence matrix - graph can be represented using a matrix of size:


Total number of vertices by total number of edges.

It means if a graph has 4 vertices and 6 edges, then it can be represented


using a matrix of 4x6 class. In this matrix, columns represent edges and
rows represent vertices.

This matrix is filled with either 0 or 1 or -1. Where,


0 is used to represent row edge which is not connected to column vertex.

1 is used to represent row edge which is connected as outgoing edge to


column vertex.

-1 is used to represent row edge which is connected as incoming edge to


column vertex.
06. Binary relations, properties and methods of representation.

Binary relations R defined on a set A and their properties:

Reflexivity, Irreflexivity, Symmetry, Antisymmetry, Asymmetry,


Transitivity

All binary relations can be represented as predicate with 2 free variables.


F.e R(x,y), for x belongs to X, y belongs to Y, so the relation is a set of
pairs (x,y) belonging to X x Y that satisfy the predicate (make it true)

Reflexive relations (Reflexivity) are always represented by a matrix that


has 1 on the main diagonal. The digraph of a reflexive relation has a loop
from each node to itself.
Symmetric relation (Symmetry)
Antisymmetric relation (Antisymmetry)
Asymmetric relation
Transitive relation
Methods of representation of binary relations:

directed graph - can present binary relation on a finite set. Consists of a


set vertices and a set of edges directed from one vertex to another. The
edges are also called arrows or directed arcs.
07. The principle of mathematical induction.

Mathematical Induction is a method of mathematical proof typically


used to establish that a given statement, theorem or formula is true for
all natural numbers (non-negative integers).

The simplest and most common form of mathematical induction proves


that a statement involving a natural number n holds for all values of n.

The principle of mathematical induction: if the integer 0 belongs to


the class F and F is hereditary, every non-negative integer belongs to F.
Alternatively, if the integer 1 belongs to the class F and F is hereditary,
then every positive integer belongs to F.

The principle is also often stated in intensional form: a property of


integers is called hereditary if, whenever any integer x has the property,
its successor has the property. If the integer 1 has a certain property and
this property is hereditary, every positive integer has the property.

Principle of Mathematical Induction

Let P(n) denote a statement involving a variable n ∈ N. If

- P(1) is true (base case) and


- P(k) is true for some natural number k, then P(k + 1) is also true.
(inductive hypothesis)

Then P(n) is true for all natural numbers n.


08. Bayes’ theorem.

Bayes' theorem ( also called Bayes' Rule or Bayes' Law) is a


mathematical formula for determining conditional probability
(possibility of an outcome occurring, based on a previous one). Bayes'
theorem provides a way to reconsider existing predictions or theories
(update probabilities) using new or additional evidence.

Bayes' theorem relies on incorporating prior probability distributions in


order to generate posterior probabilities.

Prior probability - probability of an event before new data is collected.


This is the best rational assessment of the probability of an outcome
based on the current knowledge before an experiment is performed.

Posterior probability - is the revised probability of an event occurring


after taking into consideration new information. Posterior probability is
calculated by updating the prior probability by using Bayes' theorem. In
statistical terms, the posterior probability is the probability of event A
occurring given that event B has occurred.

EXAMPLE: You might be interested in finding out a patient’s probability


of having liver disease if they are an alcoholic. “Being an alcoholic” is the
test (kind of like a litmus test) for liver disease.

A could mean the event “Patient has liver disease.” Past data tells you
that 10% of patients entering your clinic have liver disease. P(A) = 0.10.

B could mean the litmus test that “Patient is an alcoholic.” Five percent of
the clinic’s patients are alcoholics. P(B) = 0.05.

You might also know that among those patients diagnosed with liver
disease, 7% are alcoholics. This is your B|A: the probability that a patient
is alcoholic, given that they have liver disease, is 7%.

Bayes’ theorem tells you: P(A|B) = (0.07 * 0.1)/0.05 = 0.14

In other words, if the patient is an alcoholic, their chances of having liver


disease is 0.14 (14%). This is a large increase from the 10% suggested
by past data. But it’s still unlikely that any particular patient has liver
disease.
09. Statistical hypothesis testing.

A hypothesis is an educated guess about something in the world around


you. It should be testable, either by experiment or observation.

Hypothesis testing in statistics is a way for you to test the results of a


survey or experiment to see if you have meaningful results. You’re
basically testing whether your results are valid by figuring out the odds
that your results have happened by chance. If your results may have
happened by chance, the experiment won’t be repeatable and so has little
use.

#1: State null and alternative hypotheses

Null hypothesis - the statement that we doubt (could be rejected)


(i.e. the mean of the population sample equals to some value)

Alternative hypothesis - the statement that would be considered


true if the null hypothesis is rejected (i.e. mean of the sample is not
equal to some value)

#2: Collect the data and analyze

In case it is already collected and provided in the raw form or in a


form of data, like mean, standard deviation, etc.

#3: Select appropriate test

The methodology for testing depends on the target values, the


dimensions of the variables (1 or 2), or the information collected
from the data.

#4: Choose a level of significance.

Level of Significance (α):

The probability of making a Type-I error (the null hypothesis is


rejected but it is true) and it is denoted by alpha (α). Alpha is the
maximum probability that we have a Type-I error. For a 95%
confidence level, the value of alpha is 0.05. This means that there is
a 5% probability that we will reject a true null hypothesis.

#5: Perform a test whether the required values fall into the null
hypothesis or alternative

(i.e. perform tests if the mean is equal to the value or not)


You will obtain a probability value that, depending on the
hypotheses and formulas would say how likely the null hypothesis
will get into the critical regions (be unlikely)

#4: Decide which hypothesis to accept

In general, the sample data must provide sufficient evidence to


reject the null hypothesis and conclude that the effect exists in the
population. Ideally, a hypothesis test fails to reject the null
hypothesis when the effect is not present in the population, and it
rejects the null hypothesis when the effect exists.

The value obtained in the 3rd point is checked whether it falls into
the interval which is determined by the initial data and the method
we chose to solve the problem. Mostly we obtain such an interval
(i.e. {3.38;inf)) that in case the value does not fit in, we reject the
null hypothesis.
10. Determination of confidence intervals.

A confidence interval is how much uncertainty there is with any particular


statistic. Confidence intervals are often used with a margin of error. It
tells you how confident you can be that the results from a poll or survey
reflect what you would expect to find if it were possible to survey the
entire population.

All confidence intervals are constructed at a confidence level — for


instance, 95 percent. The confidence level is selected by the researchers
conducting the statistical analysis. But, what does a 95 percent
confidence level mean? If a confidence level is 95 percent, it means that if
the same population were to be sampled on multiple occasions, and
estimates of a parameter were made on each occasion, the resulting
intervals would include the true population parameter in approximately 95
percent of the cases.

Types:

● A two-sided confidence interval brackets the population parameter


of interest from above and below.
● A one-sided confidence interval brackets the population parameter
of interest from either above or below, which establishes an upper
or lower window in which the parameter exists.

How to calculate:

#1: find the number of samples (n)

#2: calculate the mean value for the sample of n length

#3: calculate the standard deviation for sample (better to calculate for
the whole population)

#4: decide the confidence interval that will be used (i.e. 95%)

#5: using the Z-table find the Z-value for the confidence interval

#6: calculate values by formula:

where:
CI = confidence interval

x = sample mean

z = confidence level value

s = sample standard deviation

n = sample size
. DATABASES
11. Essential features of relational databases.
Relational databases need ACID characteristics.
ACID refers to four essential properties: Atomicity, Consistency, Isolation,
and Durability.
These features are the key difference between a relational database and a
non-relational database.
Atomicity
Atomicity keeps data accurate. It makes sure all data is compliant with
the rules, regulations, and policies of the business.
It also requires all tasks to succeed, or the transaction will roll back.
Atomicity defines all the elements in a complete database transaction.
Consistency
The state of the database must remain consistent throughout the
transaction.
Consistency defines the rules for maintaining data points. This ensures
they remain in a correct state after a transaction.
Relational databases have data consistency because the information is
updated across applications and database copies (also known as
‘instances’). This means multiple instances always have the same data.
Isolation
With a relational database, each transaction is separate and not
dependent on others. This is made possible by isolation.
Isolation keeps the effect of a transaction invisible until it is committed.
This reduces the risk of confusion.
Durability
Durability means that you can recover data from a failed transaction.
It also ensures that data changes are permanent.
12. Essential elements and importance of entity relation diagrams and
principles of accurate database schema design.

An entity relationship diagram (ERD) shows the relationships of entity


sets stored in a database. An entity in this context is an object, a
component of data. An entity set is a collection of similar entities. These
entities can have attributes that define its properties.
By defining the entities, their attributes, and showing the relationships
between them, an ER diagram illustrates the logical structure of
databases.
ER diagrams are used to sketch out the design of a database.
Common Entity Relationship Diagram Symbols

An ER diagram is a means of visualizing how the information a system


produces is related. There are five main components of an ERD:
● Entities, which are represented by rectangles. An entity is an
object or concept about which you want to store information.

A weak entity is an entity that must defined by a


foreign key relationship with another entity as it cannot be

uniquely identified by its own attributes alone.


● Actions, which are represented by diamond shapes, show how
two entities share information in the database.

In some cases, entities can be self-linked.


For example, employees can supervise other employees.

● Attributes, which are represented by ovals. A key attribute is the


unique, distinguishing characteristic of the entity. For example, an
employee's social security number might be the employee's key
attribute.

A multivalued attribute can have more than one


value. For example, an employee entity can have multiple skill

values. A derived attribute is based on another


attribute. For example, an employee's monthly salary is based on

the employee's annual salary.


● Connecting lines, solid lines that connect attributes to show the
relationships of entities in the diagram.
● Cardinality specifies how many instances of an entity relate to
one instance of another entity. Ordinality is also closely linked to
cardinality. While cardinality specifies the occurrences of a
relationship, ordinality describes the relationship as either
mandatory or optional. In other words, cardinality specifies the
maximum number of relationships and ordinality specifies the
absolute minimum number of relationships.

● There are many notation styles that express cardinality.


Information Engineering Style
Reasons

There are two reasons to create a database diagram. You're either


designing a new schema or you need to document your existing structure.
If you have an existing database you need to to document, you create a
database diagram using data directly from your database. You can export
your database structure as a CSV file, then have a program generate the
ERD automatically.

This will be the most accurate potrait of your database and will require no
drawing on your part.

Principles of accurate database schema design

1. Make sure that each entity only appears once per diagram.
2. Name every entity, relationship, and attribute on your diagram.
3. Examine relationships between entities closely. Are they necessary?
Are there any relationships missing? Eliminate any redundant
relationships. Don't connect relationships to each other.
4. Use colors to highlight important portions of your diagram

Entity Relationship Diagram Tutorial:


● Identify the entities. The first step in making an ERD is to
identify all of the entities you will use. An entity is nothing more
than a rectangle with a description of something that your system
stores information about. This could be a customer, a manager,
an invoice, a schedule, etc. Draw a rectangle for each entity you
can think of on your page. Keep them spaced out a bit.

● Identify relationships. Look at two entities, are they related? If


so draw a solid line connecting the two entities.
● Describe the relationship. How are the entities related? Draw
an action diamond between the two entities on the line you just
added. In the diamond write a brief description of how they are
related.
● Add attributes. Any key attributes of entities should be added
using oval-shaped symbols.
● Complete the diagram. Continue to connect the entities with
lines, and adding diamonds to describe each relationship until all
relationships have been described. Each of your entities may not
have any relationships, some may have multiple relationships.
That is okay

Uses

When documenting a system or process, looking at the system in multiple


ways increases the understanding of that system. ERD diagrams are
commonly used in conjunction with a data flow diagram to display the
contents of a data store. They help us to visualize how data is connected
in a general way, and are particularly useful for constructing a relational
database
13. A concurrency mechanism of multiple users work in the database management
system.

Concurrency Control in Database Management System is a procedure of


managing simultaneous operations without conflicting with each other. It
ensures that Database transactions are performed concurrently and
accurately to produce correct results without violating data integrity of the
respective Database.
Concurrent access is quite easy if all users are just reading data. There is
no way they can interfere with one another. Though for any practical
Database, it would have a mix of READ and WRITE operations and hence
the concurrency is a challenge.
DBMS Concurrency Control is used to address such conflicts, which mostly
occur with a multi-user system. Therefore, Concurrency Control is the
most important element for proper functioning of a Database
Management System where two or more database transactions are
executed simultaneously, which require access to the same data.

Potential problems of Concurrency

Here, are some issues which you will likely to face while using the DBMS
Concurrency Control method:
● Lost Updates occur when multiple transactions select the same
row and update the row based on the value selected
● Uncommitted dependency issues occur when the second transaction
selects a row which is updated by another transaction (dirty read)
● Non-Repeatable Read occurs when a second transaction is trying
to access the same row several times and reads different data each
time.
● Incorrect Summary issue occurs when one transaction takes
summary over the value of all the instances of a repeated data-
item, and second transaction update few instances of that specific
data-item. In that situation, the resulting summary does not reflect
a correct result.
14. Basic objects, constructs and applications of SQL.

Basic objects

SQL objects are schemas, journals, catalogs, tables, aliases, views,


indexes, constraints, triggers, sequences, stored procedures, user-defined
functions, user-defined types, global variables, and SQL packages. SQL
creates and maintains these objects as system objects.

Constructs of SQL

● Queries : Retrieves data against some criteria.


● Statements : Controls transactions, program flow, connections,
sessions, or diagnostics.
● Clauses : Components of Queries and Statements.
● Expressions : Combination of symbols and operators and a key part
of the SQL statements.
● Predicates : Specifies conditions.

Uses SQL

● As a Data Definition Language (DDL)


● As a Data Control Language (DCL)
● As a Data Manipulation Language (DML)
● As a Client-Server Language & Structuring Internet Architecture.
● Back-end Development.
● Database Administration.
● Data Analysis.
● Marketing.
15. Basic principles of query optimization, including the types and
importance of indexes in databases.

For any production database, SQL query performance becomes an issue


sooner or later. Having long-running queries not only consumes system
resources that makes the server and application run slowly, but also may
lead to table locking and data corruption issues. So, query optimization
becomes an important task.

1. Understand how your database is executing your query

Nowadays all databases have their own query optimizer, and offers a way
for users to understand how a query is executed. For example, which
index from which table is being used to execute the query? The first step
to query optimization is understanding what the database is doing.
Different databases have different commands for this. For example, in
MySQL, one can use "EXPLAIN [SQL Query]" keyword to see the query
plan. In Oracle, one can use "EXPLAIN PLAN FOR [SQL Query]" to see the
query plan.

2. Retrieve as little data as possible

The more data returned from the query, the more resources the database
needs to expand to process and store these data. So for example, if you
only need to retrieve one column from a table, do not use 'SELECT *'.

3. Store intermediate results

Sometimes logic for a query can be quite complex. Often, it is possible to


achieve the desired result through the use of subqueries, inline views, and
UNION-type statements. For those cases, the intermediate results are not
stored in the database, but are immediately used within the query. This
can lead to performance issues, especially when the intermediate results
have a large number of rows.

The way to increase query performance in those cases is to store the


intermediate results in a temporary table, and break up the initial SQL
statement into several SQL statements. In many cases, you can even
build an index on the temporary table to speed up the query performance
even more. Granted, this adds a little complexity in query management
(i.e., the need to manage temporary tables), but the speedup in query
performance is often worth the trouble.
Several specific query optimization strategies:

● Use Index

Using an index is the first strategy one should use to speed up a


query. In fact, this strategy is so important that index optimization
is also discussed.

● Aggregate Table

Pre-populating tables at higher levels so less amount of data need


to be parsed.

● Vertical Partitioning.

Partition the table by columns. This strategy decreases the amount


of data a SQL query needs to process.

● Horizontal Partitioning

Partition the table by data value, most often time. This strategy
decreases the amount of data a SQL query needs to process.

● Denormalization

The process of denormalization combines multiple tables into a


single table. This speeds up query performance because fewer table
joins are needed.

● Server Tuning

Each server has its own parameters, and often tuning server
parameters so that it can fully take advantage of the hardware
resources can significantly speed up query performance.
 
COMPUTER TECHNIQUES AND ARCHITECTURE
16. Neumann’s architectural model vs. Turing’s machine
computational model, and their role in IT.

The Von-Neumann architecture - is an architecture for constructing


actual computers (which implement what the Turing machine describes
theoretically). Von-Neumann architecture describes the stored-program
computer where instructions and program data are stored in the same
memory and the machine works by changing its internal state - an
instruction operates on some data and modifies the data. This design is
still used in most computers produced today. The basic physical
organization of a modern computer, based on the von Neumann
architecture model, consists of 5 units - memory, control, arithmetic-&-
logic, input, and output.
Turing’s machine computational model is a mathematical model of
computation invented to explore the domain of computable problems
mathematically and to obtain ways of describing these computations. The
Turing machine architecture works by manipulating symbols on a tape. A
tape has an infinite number of slots, and at any one point in time, the
Turing machine is in a particular slot. Based on the symbol read at that
slot, the machine can change the symbol and move to a different slot.
Despite the model's simplicity, for any computer algorithm can be
constructed a Turing machine, capable of implementing that algorithm's
logic. This universal Turing machine is a mathematical model of the
modern computers we use today. Turing machines founds applications in
algorithmic information theory and complexity studies, software testing,
high performance computing, machine learning, software engineering,
computer networks and evolutionary computations
17. Boolean logic and its application in computer hardware.

Boolean Logic is a form of algebra which is centered around three simple


words known as Boolean Operators: “Or,” “And,” and “Not”. At the heart
of Boolean Logic is the idea that all values are either true or false.

The Boolean operator “OR” is used to express that as long as one of two
or more conditions are met, the value of a specified query is true.

As a Boolean operator, “AND” serves to indicate that ALL specified


conditions must be met in order for a query to return true.

The use of the “AND” operator means that a user must meet ALL of the
specified criteria to be included in the audience; users who merely like
Fishing or like only Fishing and History (etc.) will be excluded from this
audience definition.

The “NOT” Boolean operator is used to exclude nodes from an audience


definition. As it applies to the creation of an audience definition, “NOT”
will exclude all users falling under the node which has been prepended by
“NOT.”

A Boolean function is a function that operates on binary inputs and


returns binary outputs. Since computer hardware is based on the
representation and manipulation of binary values, Boolean functions play
a central role in the specification, construction, and optimization of
hardware architectures.
18. Binary notation of integers, floating- point notation of real
numbers, computer arithmetic.

Computer arithmetic is a field of computer science that investigates


how computers should represent numbers and perform operations on
them.

Binary Representation of positive integers

Binary representations of positive can be understood in the


same way as their decimal counterparts. For example

8610 = 1*64 + 0*32 + 1*16 + 0*8 + 1*4 + 1*2 + 0*1

or

8610 = 1* 26 + 0* 25 + 1* 24 + 0* 23 + 1* 22 + 1* 21 + 0* 20

or

8610 = 1010110 2

The subscript 2 denotes a binary number. Each digit in a binary


number is called a bit. The number 1010110 is represented by 7
bits. Any number can be broken down this way, by finding all of
the powers of 2 that add up to the number in question (in this
case 26, 24, 22 and 21). You can see this is exactly analagous to
the decimal deconstruction of the number 125 that was done
earlier. Likewise we can make a similar set of observations:

● To multiply a number by 2 you can simply shift it to the


left by one digit, and fill in the rightmost digit with a 0. To
divide a number by 2, simply shift the number to the right
by one digit.
● To see how many digits a number needs, you can simply
take the logarithm (base 2) of the number, and add 1 to
it. The integer part of the result is the number of digits.
For instance,
log2(86) + 1 = 7.426.
The integer part of that is 7, so 7 digits are needed.
● With n digits, 2n unique numbers (from 0 to 2n-1) can be
represented. If n=8, 256 (=28) numbers can be
represented 0-255.

Floating point

1. To convert the floating point into decimal, we have 3 elements in


a 32-bit floating point representation:
i) Sign

ii) Exponent

iii) Mantissa

● Sign bit is the first bit of the binary representation. ‘1’ implies
negative number and ‘0’ implies positive number.

Example: 11000001110100000000000000000000 This is


negative number.

● Exponent is decided by the next 8 bits of binary


representation. 127 is the unique number for 32 bit floating
point representation. It is known as bias. It is determined by
2k-1 -1 where ‘k’ is the number of bits in exponent field.

There are 3 exponent bits in 8-bit representation and 8


exponent bits in 32-bit representation.

Thus

bias = 3 for 8 bit conversion (23-1 -1 = 4-1 = 3)

bias = 127 for 32 bit conversion. (28-1 -1 = 128-1 = 127)

Example: 01000001110100000000000000000000

10000011 = (131)10

131-127 = 4

Hence the exponent of 2 will be 4 i.e. 24 = 16.

● Mantissa is calculated from the remaining 23 bits of the


binary representation. It consists of ‘1’ and a fractional part
which is determined by:

Example:

01000001110100000000000000000000

The fractional part of mantissa is given by:

1*(1/2) + 0*(1/4) + 1*(1/8) + 0*(1/16) +……… = 0.625

Thus the mantissa will be 1 + 0.625 = 1.625

The decimal number hence given as: Sign*Exponent*Mantissa


= (-1)0*(16)*(1.625) = 26
2. To convert the decimal into floating point, we have 3 elements in
a 32-bit floating point representation:

i) Sign (MSB)

ii) Exponent (8 bits after MSB)

iii) Mantissa (Remaining 23 bits)

● Sign bit is the first bit of the binary representation. ‘1’ implies
negative number and ‘0’ implies positive number.

Example: To convert -17 into 32-bit floating point


representation Sign bit = 1

Exponent is decided by the nearest smaller or equal to 2n


number. For 17, 16 is the nearest 2n. Hence the exponent of 2
will be 4 since 24 = 16. 127 is the unique number for 32 bit

Floating point representation.

It is known as bias. It is determined by 2k-1 -1 where ‘k’ is the


number of bits in exponent field.

Thus bias = 127 for 32 bit. (28-1 -1 = 128-1 = 127)

Now, 127 + 4 = 131 i.e. 10000011 in binary representation.

● Mantissa: 17 in binary = 10001.

Move the binary point so that there is only one bit from the
left. Adjust the exponent of 2 so that the value does not
change. This is normalizing the number. 1.0001 x 24. Now,
consider the fractional part and represented as 23 bits by
adding zeros.

00010000000000000000000

19. Computational efficiency measures of processors, computer


memory and computing systems.

In computing, computer performance is the amount of useful work


accomplished by a computer system. Outside of specific contexts,
computer performance is estimated in terms of accuracy, efficiency and
speed of executing computer program instructions. When it comes to high
computer performance, one or more of the following factors might be
involved:
● Short response time for a given piece of work.
● High throughput (rate of processing work).
● Low utilization of computing resource(s).
○ Fast (or highly compact) data compression and
decompression.
● High availability of the computing system or application.
● High bandwidth.
● Short data transmission time.

CPU efficiency is a measure of how well an application utilizes its requests


for CPU. Efficiency is calculated with the following formula:

efficiency=cpu_time / (run_time x number_of_cpus).

Computing system is a system of one or more computers and


associated software with common storage

Computing is any goal-oriented activity requiring, benefiting from, or


creating computing machinery. It includes the study and experimentation
of algorithmic processes and development of both hardware and software.
It has scientific, engineering, mathematical, technological and social
aspects.

Memory
Computer memory is the storage space in the computer, where data is to
be processed and instructions required for processing are stored. The
memory is divided into large number of small parts called cells. Each
location or cell has a unique address, which varies from zero to memory
size minus one. For example, if the computer has 64k words, then this
memory unit has 64 * 1024 = 65536 memory locations. The address of
these locations varies from 0 to 65535.
Memory is primarily of three types −
● Cache Memory
● Primary Memory/Main Memory
● Secondary Memory

Cache Memory
Cache memory is a very high speed semiconductor memory which can
speed up the CPU. It acts as a buffer between the CPU and the main
memory. It is used to hold those parts of data and program which are
most frequently used by the CPU. The parts of data and programs are
transferred from the disk to cache memory by the operating system,
from where the CPU can access them.

Advantages
The advantages of cache memory are as follows −
● Cache memory is faster than main memory.
● It consumes less access time as compared to main memory.
● It stores the program that can be executed within a short period of
time.
● It stores data for temporary use.

Disadvantages
The disadvantages of cache memory are as follows −
● Cache memory has limited capacity.
● It is very expensive.

Primary Memory (Main Memory)


Primary memory holds only those data and instructions on which the
computer is currently working. It has a limited capacity and data is lost
when power is switched off. It is generally made up of semiconductor
device. These memories are not as fast as registers. The data and
instruction required to be processed resides in the main memory. It is
divided into two subcategories RAM and ROM.
Characteristics of Main Memory
● These are semiconductor memories.
● It is known as the main memory.
● Usually volatile memory.
● Data is lost in case power is switched off.
● It is the working memory of the computer.
● Faster than secondary memories.
● A computer cannot run without the primary memory.

Secondary Memory
This type of memory is also known as external memory or non-volatile. It
is slower than the main memory. These are used for storing
data/information permanently. CPU directly does not access these
memories, instead they are accessed via input-output routines. The
contents of secondary memories are first transferred to the main
memory, and then the CPU can access it. For example, disk, CD-ROM,
DVD, etc.

Characteristics of Secondary Memory


● These are magnetic and optical memories.
● It is known as the backup memory.
● It is a non-volatile memory.
● Data is permanently stored even if power is switched off.
● It is used for storage of data in a computer.
● Computer may run without the secondary memory.
● Slower than primary memories.
20. Moore’s Law and its implications in the context of hardware
development.

What Is Moore's Law?

Moore's Law refers to Gordon Moore's perception that the number of


transistors on a microchip doubles every two years, though the cost of
computers is halved. Moore's Law states that we can expect the speed
and capability of our computers to increase every couple of years, and we
will pay less for them. Another tenet of Moore's Law asserts that this
growth is exponential.

Computing

As transistors in integrated circuits become more efficient, computers


become smaller and faster. Chips and transistors are microscopic
structures that contain carbon and silicon molecules, which are aligned
perfectly to move electricity along the circuit faster. The faster a
microchip processes electrical signals, the more efficient a computer
becomes. The cost of higher-powered computers has been dropping
annually, partly because of lower labor costs and reduced semiconductor
prices.2

Electronics

Practically every facet of a high-tech society benefits from Moore's Law in


action. Mobile devices, such as smartphones and computer tablets would
not work without tiny processors; neither would video games,
spreadsheets, accurate weather forecasts, and global positioning systems
(GPS).

All Sectors Benefit

Moreover, smaller and faster computers improve transportation, health


care, education, and energy production—to name but a few of the
industries that have progressed because of the increased power of
computer chips.

Moore's Law's Impending End

Experts agree that computers should reach the physical limits of Moore's
Law at some point in the 2020s.3 The high temperatures of transistors
eventually would make it impossible to create smaller circuits. This is
because cooling down the transistors takes more energy than the amount
of energy that already passes through the transistors.4 In a 2007
interview, Moore himself admitted that "...the fact that materials are
made of atoms is the fundamental limitation and it's not that far
away...We're pushing up against some fairly fundamental limits so one of
these days we're going to have to stop making things smaller." 5

 
. ALGORITHMS AND DATA STRUCTURES
21. Estimation of algorithmic complexity and complexity class of
algorithmic problems.

Computational complexity or simply complexity of an algorithm is a


measure of the amount of time and/or space required by an algorithm for
an input of a given size.

The analysis of algorithms is the process of finding the computational


complexity of algorithms.

Usually, this involves determining a function that relates the length of an


algorithm's input to the number of steps it takes (its time complexity) or
the number of storage locations it uses (its space complexity). An
algorithm is said to be efficient when this function's values are small, or
grow slowly compared to a growth in the size of the input.

Notations:

Theta Notation (Θ-notation) - complexity approximately equals to sth

Omega Notation (Ω-notation) - complexity is larger than (best case


scenario)

Big-O Notation (O-notation) - complexity is lower than (worst case


scenario)
Complexity O(n log n), means that for the n elements of input the
algorithm would need to make n*log(n) operations.

Complexity classes (some of them)

Complexity class is a set of computational problems of related resource-


based complexity. The two most commonly analyzed resources are time
and memory.

Increasing complexity, each completely containing the previous:

NL - decision problems that can be solved by a nondeterministic Turing


machine using a logarithmic amount of memory space

P - can be solved by a deterministic Turing machine using a polynomial


amount time

NP - can be solved by a nondeterministic Turing machine using a


polynomial amount time

PSPACE - can be solved by a Turing machine using a polynomial amount


of space

EXPTIME - solvable by a deterministic Turing machine in exponential


time
EXPSPACE - solvable by a deterministic Turing machine in exponential
space
22. Major types of search and sorting algorithms: review and
applications.
Sorting Algorithms are methods of reorganizing a large number of items
into some specific order such as highest to lowest, or vice-versa, or even
in some alphabetical order.
These algorithms take an input list, processes it (i.e, performs some
operations on it) and produce the sorted list.
The most common example we experience every day is sorting clothes or
other items on an e-commerce website either by lowest-price to highest,
or list by popularity, or some other order.
Types of Sorting Algorithms:

Quick Sort

The algorithm was developed by a British computer scientist Tony


Hoare in 1959. The name "Quick Sort" comes from the fact that,
quick sort is capable of sorting a list of data elements significantly
faster (twice or thrice faster) than any of the common sorting
algorithms. It is one of the most efficient sorting algorithms and is
based on the splitting of an array (partition) into smaller ones and
swapping (exchange) based on the comparison with 'pivot' element
selected. Due to this, quick sort is also called as "Partition
Exchange" sort. Like Merge sort, Quick sort also falls into the
category of divide and conquer approach of problem-solving
methodology.

● Commercial Computing is used in various government and


private organizations for the purpose of sorting various data
like sorting files by name/date/price, sorting of students by
their roll no., sorting of account profile by given id, etc.
● The sorting algorithm is used for information searching and as
Quicksort is the fastest algorithm so it is widely used as a
better way of searching.
● It is used everywhere where a stable sort is not needed.
● Quicksort is a cache-friendly algorithm as it has a good
locality of reference when used for arrays.
● It is tail -recursive and hence all the call optimization can be
done.
● It is an in-place sort that does not require any extra storage
memory.
● It is used in operational research and event-driven simulation.
● Numerical computations and in scientific research, for
accuracy in calculations most of the efficiently developed
algorithm uses priority queue and quick sort is used for
sorting.
● Variants of Quicksort are used to separate the Kth smallest or
largest elements.
● It is used to implement primitive type methods.
● If data is sorted then the search for information became easy
and efficient.

Bubble Sort

Bubble sort, also referred to as comparison sort, is a simple sorting


algorithm that repeatedly goes through the list, compares adjacent
elements and swaps them if they are in the wrong order. This is the
most simplest algorithm and inefficient at the same time. Yet, it is
very much necessary to learn about it as it represents the basic
foundations of sorting.

It is used in academia to introduce 1st-year computer science


students to the concept of a sorting algorithm.

It is comparably simpler to understand than some other sorting


algorithms. You quickly move beyond it after it is introduced.

Merge Sort

Merge sort is one of the most efficient sorting algorithms. It works


on the principle of Divide and Conquer. Merge sort repeatedly
breaks down a list into several sublists until each sublist consists of
a single element and merging those sublists in a manner that
results into a sorted list.

● Merge Sort is useful for sorting linked lists in O(n Log n) time.
● Merge sort can be implemented without extra space for linked
lists.
● Merge sort is used for counting inversions in a list.
● Merge sort is used in external sorting.

Insertion Sort

Insertion sort is the sorting mechanism where the sorted array is


built having one item at a time. The array elements are compared
with each other sequentially and then arranged simultaneously in
some particular order. The analogy can be understood from the
style we arrange a deck of cards. This sort works on the principle of
inserting an element at a particular position, hence the name
Insertion Sort.
Insertion sort is used when number of elements is small. It can also
be useful when input array is almost sorted, only few elements are
misplaced in complete big array.

Selection Sort

The idea behind this algorithm is pretty simple. We divide the array into
two parts: sorted and unsorted. The left part is sorted subarray and the
right part is unsorted subarray. Initially, sorted subarray is empty and
unsorted array is the complete given array.

We perform the steps given below until the unsorted subarray becomes
empty:

● Pick the minimum element from the unsorted subarray.


● Swap it with the leftmost element of the unsorted subarray.
● Now the leftmost element of unsorted subarray becomes a
part (rightmost) of sorted subarray and will not be a part of
unsorted subarray.

Uses

● a small list is to be sorted.


● cost of swapping does not matter.
● checking of all the elements is compulsory.
● cost of writing to a memory matters like in flash memory
(number of writes/swaps is O(n) as compared to O(n2) of
bubble sort)

Heap Sort

Heap sort is a comparison-based sorting technique based on Binary


Heap data structure. It is similar to selection sort where we first find
the minimum element and place the minimum element at the
beginning. We repeat the same process for the remaining elements.
Other usages include finding the order in statistics, dealing with
priority queues in Prim's algorithm (also called the minimum
spanning tree) and Huffman encoding or data compression.

Radix Sort

The idea of Radix Sort is to do digit by digit sort starting from least
significant digit to most significant digit. Radix sort uses counting
sort as a subroutine to sort.

Applications of Radix Sort :

● In a typical computer, which is a sequential random-access


machine, where the records are keyed by multiple fields radix
sort is used. For eg., you want to sort on three keys month,
day and year. You could compare two records on year, then
on a tie on month and finally on the date. Alternatively,
sorting the data three times using Radix sort first on the date,
then on month, and finally on year could be used.
● It was used in card sorting machines that had 80 columns,
and in each column, the machine could punch a hole only in
12 places. The sorter was then programmed to sort the cards,
depending upon which place the card had been punched. This
was then used by the operator to collect the cards which had
the 1st row punched, followed by the 2nd row, and so on.
23. Characteristics and applications of the basic data structures: stack, queue, priority
queue, Find-Union structure, dictionary.

Array

One of the simplest data structures, an array is a collection of items that


are stored sequentially. An array contains values or variables—known as
“elements”—of the same data type and is of a fixed size, so you cannot
change the size of an array. Each item in an array is indexed starting with
0.

The best way to think about an array is like a weekly medication


organizer. It includes small containers lined up in a sequence, and each
container has elements inside.

Arrays are commonly used as structures for building other, more


complicated data structures. They are also used for sorting algorithms.

Linked list

A linked list is a sequence of items arranged in a linear order all


connected to each other. This means you must access data in order, so
random access to data is not possible.

Each element in a linked list is called a “node,” and each node contains a
key and a pointer. The pointer directs you to the next node, called a
“next.” The sequence starts with a “head,” which directs you to the first
element within the list. The last element of this list is known as the “tail.”

You can create a singly linked list, which lets you traverse each item in a
forward direction from the head to the tail. Similarly, you can create a
doubly-linked list, which can be traversed both forward and backward.
And finally, you can create a circular linked list in which the next pointer
of the tail points to the head and vice versa, forming a circle.

Linked lists are used for symbol table management in switching between
programs using Alt + Tab (On a PC).

Stack

A stack works almost exactly as it sounds. It’s like stacking elements


within a tall container.

Stacks are known as LIFO (Last In First Out) structures. This means the
element placed last can be accessed first. You can “push” a new element
onto the top of the stack, or you can “pop,” deleting the element inserted
last which is at the top of the stack.

Stacks are commonly used for parsing and evaluating mathematical


expressions and to implement function calls in recursion programming.

Queue

A queue functions similarly to a stack, but instead of being a LIFO


structure, it is a FIFO (First In First Out) structure. The easiest way to
think about a queue is to think of a line of people waiting to enter a
building. The person at the beginning of the line will enter the building
first, while the person at the end will enter last.

You can enqueue an element in this structure, which means inserting the
element to the end of the queue. You can also dequeue an element, which
means deleting an element from the beginning of the queue.

Queues are often used to manage threads in multithreading, and they are
(not surprisingly) used to implement priority queuing systems.

Priority queue

A priority queue is an extension of a queue that contains the following


characteristics:

● Every element in a priority queue has a priority value associated


with it
● The element with the higher priority will be moved to the top and
removed first
● If two elements in a priority queue have the same priority value,
they’ll be arranged using the FIFO principle

Applications:

● Data compression: It is used in data compression techniques like


Huffman code
● Operating Systems: Priority queues are used to select the next
process to run, ensuring high-priority tasks run before low-priority
ones. It is also applied for load balancing, and interrupt handling
● Bandwidth Management: Priority queues are utilized to prioritize the
important data packet, so the network can make sure that those
packets reach the destination as quickly as possible.

Tree
A tree is a structure similar to a linked list because each item is linked.
But in a tree items are linked in a hierarchal fashion, just like you might
see in a visual representation of someone’s family tree. There are various
types of trees, each suited to different applications.

For example, a binary search tree (BST) stores data in sorted order with
every node in the binary comprised of the following attributes:

Key (the value saved in the node)

Left (pointer to the left child node)

Right (pointer to the right child node)

P (pointer to the parent node)

Binary search trees are used in many different types of search


applications. Other types of trees are used in wireless networking and to
create expression solvers.

Heap

Similarly, a heap is a type of binary tree in which the parent nodes are
compared to their children. This allows the values within the nodes to be
arranged accordingly. Heaps can be represented as trees, but they can
also be represented as binary arrays.

There are two types of heaps. In a min heap, the parent’s key is less than
or equal to the keys of its children. In a max heap, the parent’s key is
greater than or equal to the keys of its children.

Heaps are often used in algorithms to create priority queues, and to find
the smallest or largest value in an array.

Graph

A graph is an abstract, non-linear data structure that is made of a finite


set of nodes that are connected by edges. The nodes may be referred to
as “vertices” and contain values, whereas the edges are simply lines or
arcs that connect two nodes in the graph.

Graphs are often used to represent networks, such as circuit networks or


even paths in a city. They're great for solving real-world problems, but
they can also be used as representations of digital networks.
For example, on Facebook, each user could be represented with a node
(or vertex). Each vertex could then contain information about that user,
and each edge could represent their connection with another user.

Find-Union structure

In computer science, a disjoint-set data structure, also called a union–find


data structure, is a data structure that stores a collection of disjoint (non-
overlapping) sets or elements.

Applications are operations with graphs.

Dictionary

A dictionary is another structure for organizing the values of an


abstraction. The important characteristics of a dictionary are:

● content: the elements need not be of the same type or are


conceptually different
● organization: an unordered collection of key-value pairs
● access: return the value associated with a given key
● construction: adding a new key-value pair

The two major solutions to the dictionary problem are hash tables and
search trees.

Application: any situation where it is important to divide the data by some


keys: Students by group number or mark by student.
24. Binary and n-ary trees in algorithmics. Characteristics, implementation methods
and applications.

Binary tree:

In computer science, a binary tree is a tree data structure in which each


node has at most two children, which are referred to as the left child and
the right child.

Implementation:

Structure of a Binary Tree node that contains the following parts.

● Data
● Pointer to left child
● Pointer to right child

A pointer to the root with methods of traversing and manipulation.

Applications:

● Binary Tree is used to as the basic data structure in Microsoft Excel


and spreadsheets in usual.
● Binary Tree is used to implement indexing of Segmented Database.
● Splay Tree (Binary Tree variant) is used in implemented efficient
cache is hardware and software systems.
● Binary Space Partition Trees are used in Computer Graphics, Back
face Culling, Collision detection, Ray Tracing and algorithms in
rendering game graphics.

N-ary tree

N-ary trees are tree data structures that allow us to have up to n children
nodes for each of the nodes, differing from the standard binary trees
which allow only up to 2 children nodes for each node.

Structure of an N-aryTree node that contains the following parts.

● Data
● Pointers to children (preferably collections with dynamic sizes as the
number of trees may not be known)

A pointer to the root with methods of traversing and manipulation.

Applications:

The N-Ary trees can be used to show a computer’s storage hierarchy.


25. Recursive algorithms vs. iterative algorithms: comparison and the outline of
essential design objectives.
 

Iterative Recursive

Requires a loop in order to repeat Requires a function that would call


steps several times. itself again and again until the
stop-condition is satisfied.

Repeats the loop body until the Repeats calling the body until the
continuation requirement is not base case is found
met

Uses a looping construct Uses a branching structure

Sometimes more efficient Mostly less efficient in terms of


time and space

Infinite iterations consume CPU Infinite recursion leads to crushes


cycles

Makes code longer Makes code shorter

Easy to get the number of More difficult to estimate the


iterations, thus calculate the complexity as it requires the count
complexity of recursive calls

Used to give step by step Used mainly to simplify the


instructions that would repeat problem until the most simple case
some times and perform a work or (base case) is met and the other
an algorithm until it meets the end ones are repeated basing on its
output
. PROGRAMMING METHODS, KEY ISSUES
26. Object-oriented design and operating memory management in
Java and C++.

Multiple Inheritance

C++ supports various types of inheritances including single and multiple


inheritances.

Although there are problems arising from multiple inheritances, C++ uses
the virtual keyword to resolve the problems.

Java, supports only single inheritance. Effects of multiple inheritance can


be achieved using the interfaces in Java.

Overloading

In C++, methods and operators can be overloaded. This is static


polymorphism. In Java, only method overloading is allowed. It does not
allow operator overloading.

Library Interface

C++ allows direct calls to the native system libraries. Hence it is more
suited for system-level programming. Java has no direct call support to its
native libraries. We can call the libraries through Java Native Interface or
Java Native Access.

Access Control And Object Protection

C++ has a flexible model for objects with access specifiers controlling the
access and strong encapsulation ensuring protection. Java has a
comparatively cumbersome object model with weak encapsulation.

Object Management

In C++ objects are managed manually. The creation and destruction of


objects are carried out manually using the new and delete operators
respectively. We also use constructors and destructors for class objects.
Java does not support destructors though it supports constructors. Java is
also heavily dependent on automatic garbage collection for collecting and
destroying objects.

Memory management
Memory management is basic for all languages because it is the important
factor to determine the efficiency of the language. Language like Java
have own garbage collector hence the programmer no need to do
memory management. But in C++ the programmer has to release the
memory through new and delete functions. In this paper, we are going to
discuss how the memory is managed in both the languages and what are
all the issues are there in memory in both the languages.
27. The role of classes, interfaces and mixins in programming on the
basis of Java.

Interface

An interface in the Java programming language is an abstract type that is


used to specify a behavior that classes must implement. A class that
implements an interface must implement all of the non-default methods
described in the interface, or be an abstract class.

Class

Class. A class is a user defined blueprint or prototype from which objects


are created. It represents the set of properties or methods that are
common to all objects of one type.

Mixin

Mixin is a type that a class can implement in addition to its "primary type"
to declare that it provides some optional behaviour

28. The concept of inheritance on the basis of Java and C++.

An interface in the Java programming language is an abstract type that is


used to specify a behavior that classes must implement.
29. The essence and application of polymorphism on the basis of
Java and C++

Java

Polymorphism in Java is a concept by which we can perform a single


action in different ways. So polymorphism means many forms. There are
two types of polymorphism in Java: compile-time polymorphism and
runtime polymorphism. We can perform polymorphism in java by method
overloading and method overriding.

C++

Polymorphism in C++ means, the same entity (function or object)


behaves differently in different scenarios.
30. The use of arrays and other data structures in Java and C++.
Java Collections Framework.

Java Collections Framework

The Java platform includes a collections framework. A collection is an


object that represents a group of objects (such as the classic Vector
class). A collections framework is a unified architecture for representing
and manipulating collections, enabling collections to be manipulated
independently of implementation details.

The primary advantages of a collections framework are that it:

● Reduces programming effort by providing data structures and

algorithms so you don't have to write them yourself.

● Increases performance by providing high-performance

implementations of data structures and algorithms. Because the

various implementations of each interface are interchangeable,

programs can be tuned by switching implementations.

● Provides interoperability between unrelated APIs by establishing

a common language to pass collections back and forth.

● Reduces the effort required to learn APIs by requiring you to

learn multiple ad hoc collection APIs.

● Reduces the effort required to design and implement APIs by not

requiring you to produce ad hoc collections APIs.

● Fosters software reuse by providing a standard interface for

collections and algorithms with which to manipulate them.

Java

Java provides a data structure, the array, which stores a fixed-size


sequential collection of elements of the same type. An array is used to
store a collection of data, but it is often more useful to think of an array
as a collection of variables of the same type.
C++
C++ provides a data structure, the array, which stores a fixed-size
sequential collection of elements of the same type. An array is used to
store a collection of data, but it is often more useful to think of an array
as a collection of variables of the same type.

Difference

A Java array is aware of its size while a C++ array is not. Java detects
and notifies a programmer when an array is indexed out of bounds C++
does not. In C++ it is possible to create an array of fully constructed
objects in a single operation; Java requires multiple operations to create
an array of objects.
31. Concurrent programming: mechanisms and tools on the basis of
Java and C++.

Java

The Java platform is designed from the ground up to support concurrent


programming, with basic concurrency support in the Java programming
language and the Java class libraries. Since version 5.0, the Java platform
has also included high-level concurrency APIs.

In concurrent programming, there are two basic units of execution:


processes and threads. In the Java programming language, concurrent
programming is mostly concerned with threads. However, processes are
also important.

Processes

A process has a self-contained execution environment. A process


generally has a complete, private set of basic run-time resources; in
particular, each process has its own memory space.

Processes are often seen as synonymous with programs or applications.


However, what the user sees as a single application may in fact be a set
of cooperating processes. To facilitate communication between processes,
most operating systems support Inter Process Communication (IPC)
resources, such as pipes and sockets. IPC is used not just for
communication between processes on the same system, but processes on
different systems.

Most implementations of the Java virtual machine run as a single process.


A Java application can create additional processes using a ProcessBuilder
object. Multiprocess applications are beyond the scope of this lesson.

Threads

Threads are sometimes called lightweight processes. Both processes and


threads provide an execution environment, but creating a new thread
requires fewer resources than creating a new process.

Threads exist within a process — every process has at least one. Threads
share the process's resources, including memory and open files. This
makes for efficient, but potentially problematic, communication.

Multithreaded execution is an essential feature of the Java platform. Every


application has at least one thread — or several, if you count "system"
threads that do things like memory management and signal handling. But
from the application programmer's point of view, you start with just one
thread, called the main thread. This thread has the ability to create
additional threads
C++ was originally designed to support only single thread programming.
In every application, there is one default thread. The execution control
would go straight to the main() function (entry point for default thread),
the program would execute in a pretty much sequential manner (one
computation would complete before the next starts), and end of the story.

In C++, the two most common ways of implementing concurrency are


through multithreading and parallelism. While these can be used in other
programming languages, C++ stands out for its concurrent capabilities
with lower than average overhead costs as well as its capacity for
complex instruction.

C++ multithreading involves creating and using thread objects,


seen as std::thread in code, to carry out delegated sub-tasks
independently.

New threads are passed a function to complete, and optionally


some parameters for that function.

While each individual thread can complete only one function at a


time, thread pools allow us to recycle and reuse thread objects to
give programs the illusion of unlimited multitasking.

Not only does this take advantage of multiple CPU cores, but it
also allows the developer to control the number of tasks taken on
by manipulating the thread pool size. The program can then use
the computer resources efficiently without overloading becoming
overloaded.

To better understand thread pools, consider the relationship of


worker bees to a hive queen:

The queen (the program) has a broader goal to accomplish (the


survival of the hive) while the workers (the threads) only have
their individual tasks given by the queen.

Once these tasks are completed, the bees return to the queen for
further instruction. At any one time, there is a set number of
these workers being commanded by the queen, enough to utilize
all of its hive space without overcrowding it.

C++ Parallelism
Creating different threads is typically expensive in terms of both time and
memory overhead for the program. Multithreading can therefore be
wasteful when dealing with short simpler functions.

For times like these, developers can instead use parallel execution policy
annotations, a way of marking certain functions as candidates for
concurrency without creating threads explicitly.

At its most basic, there are two marks that can be encoded into a
function. The first is parallel, which suggests to the compiler that the
function be completed concurrently with other parallel functions. The
other is sequential, meaning that the function must be completed
individually.

Parallel functions can significantly speed up operations because they


automatically use more of the computer’s CPU resources.

However, it is best saved for functions that have little interaction with
other functions using dependencies or data editing. This is because while
they are worked on concurrently, there is no way to know which will
complete first, meaning the result is unpredictable unless synchronization
such as mutex or condition variables are used.
32. Parameterized types and methods (generics) in Java. Templates in C++.

Java

The idea is to allow type (Integer, String, … etc, and user-defined types)
to be a parameter to methods, classes, and interfaces. Using Generics, it
is possible to create classes that work with different data types.

An entity such as class, interface, or method that operates on a


parameterized type is called a generic entity.

Generic Class

Like C++, we use <> to specify parameter types in generic class creation.
To create objects of a generic class, we use the following syntax.

Generic Functions:

We can also write generic functions that can be called with different types
of arguments based on the type of arguments passed to the generic
method, the compiler handles each method.
Generics work only with Reference Types:

When we declare an instance of a generic type, the type argument passed


to the type parameter must be a reference type. We cannot use primitive
data types like int, char.

The above line results in a compile-time error, that can be resolved by


using type wrappers to encapsulate a primitive type.

But primitive type array can be passed to the type parameter because
arrays are reference type.

Advantages of Generics:

Programs that use Generics has got many benefits over non-generic code.

1. 1. Code Reuse: We can write a method/class/interface once and use


it for any type we want.
2. 2. Type Safety: Generics make errors to appear compile time than
at run time (It’s always better to know problems in your code at
compile time rather than making your code fail at run time).
Suppose you want to create an ArrayList that store name of
students and if by mistake programmer adds an integer object
instead of a string, the compiler allows it. But, when we retrieve this
data from ArrayList, it causes problems at runtime.
3. Individual Type Casting is not needed: If we do not use generics,
then, in the above example every time we retrieve data from
ArrayList, we have to typecast it. Typecasting at every retrieval
operation is a big headache. If we already know that our list only
holds string data then we need not typecast it every time.
4. Generics promotes code reusability.
5. Implementing generic algorithms: By using generics, we can
implement algorithms that work on different types of objects and at
the same, they are type safe too.

C++

How do templates work?

Templates are expanded at compiler time. This is like macros. The


difference is, the compiler does type checking before template expansion.
The idea is simple, source code contains only function/class, but compiled
code may contain multiple copies of same function/class.

Function Templates

We write a generic function that can be used for different data types.
Examples of function templates are sort(), max(), min(), printArray().

Class Templates
Like function templates, class templates are useful when a class defines
something that is independent of the data type. Can be useful for classes
like LinkedList, BinaryTree, Stack, Queue, Array, etc.

Following is a simple example of template Array class.

Can there be more than one arguments to templates?

Yes, like normal parameters, we can pass more than one data types as
arguments to templates. The following example demonstrates the same.

Can we specify default value for template arguments?

Yes, like normal parameters, we can specify default arguments to


templates. The following example demonstrates the same.

What is the difference between function overloading and


templates?

Both function overloading and templates are examples of polymorphism


feature of OOP. Function overloading is used when multiple functions do
similar operations, templates are used when multiple functions do
identical operations.
Can we pass nontype parameters to templates?

We can pass non-type arguments to templates. Non-type parameters are


mainly used for specifying max or min values or any other constant value
for a particular instance of a template. The important thing to note about
non-type parameters is, they must be const. The compiler must know the
value of non-type parameters at compile time. Because the compiler
needs to create functions/classes for a specified non-type value at
compile time. In below program, if we replace 10000 or 25 with a
variable, we get a compiler error.
33. Lambda expressions and functional interfaces in Java.

A lambda expression is a short block of code which takes in parameters


and returns a value. Lambda expressions are similar to methods, but they
do not need a name and they can be implemented right in the body of a
method.

Expressions are limited. They have to immediately return a value, and


they cannot contain variables, assignments or statements such as if or
for. In order to do more complex operations, a code block can be used
with curly braces. If the lambda expression needs to return a value, then
the code block should have a return statement.

Lambda expressions can be stored in variables if the variable's type is an


interface which has only one method. The lambda expression should have
the same number of parameters and the same return type as that
method. Java has many of these kinds of interfaces built in, such as the
Consumer interface (found in the java.util package) used by lists.

To use a lambda expression in a method, the method should have a


parameter with a single-method interface as its type. Calling the
interface's method will run the lambda expression.
34. Stream processing in Java (on the basis of java.util.stream
package).

Introduced in Java 8, the Stream API is used to process collections of


objects. A stream is a sequence of objects that supports various methods
which can be pipelined to produce the desired result.

The features of Java stream are –

● A stream is not a data structure instead it takes input from the


Collections, Arrays or I/O channels.
● Streams don’t change the original data structure, they only provide
the result as per the pipelined methods.
● Each intermediate operation is lazily executed and returns a stream
as a result, hence various intermediate operations can be pipelined.
Terminal operations mark the end of the stream and return the
result.

Different Operations On Streams-

Intermediate Operations:

1. map: The map method is used to returns a stream consisting of the


results of applying the given function to the elements of this
stream.

List number = Arrays.asList(2,3,4,5);

List square = number.stream().map(x-


>x*x).collect(Collectors.toList());

2. filter: The filter method is used to select elements as per the


Predicate passed as argument.

List names = Arrays.asList("Reflection","Collection","Stream");

List result = names.stream().filter(s-


>s.startsWith("S")).collect(Collectors.toList());

3. sorted: The sorted method is used to sort the stream.

List names = Arrays.asList("Reflection","Collection","Stream");

List result = names.stream().sorted().collect(Collectors.toList());

Terminal Operations:
1. collect: The collect method is used to return the result of the
intermediate operations performed on the stream.

List number = Arrays.asList(2,3,4,5,3);

Set square = number.stream().map(x-


>x*x).collect(Collectors.toSet());

2. forEach: The forEach method is used to iterate through every


element of the stream.

List number = Arrays.asList(2,3,4,5);

number.stream().map(x->x*x).forEach(y->System.out.println(y));

3. reduce: The reduce method is used to reduce the elements of a


stream to a single value.

The reduce method takes a BinaryOperator as a parameter.

List number = Arrays.asList(2,3,4,5);

int even = number.stream().filter(x->x%2==0).reduce(0,(ans,i)->


ans+i);

Important Points/Observations:

1. A stream consists of source followed by zero or more intermediate


methods combined together (pipelined) and a terminal method to
process the objects obtained from the source as per the methods
described.
2. Stream is used to compute elements as per the pipelined methods
without altering the original value of the object.
35. Tools for the input/output operation programming in Java.

 Java brings various Streams with its I/O package that helps the user to
perform all the input-output operations. These streams support all the
types of objects, data-types, characters, files etc to fully execute the I/O
operations.

Standart

1. System.in: This is the standard input stream that is used to read


characters from the keyboard or any other standard input device.
2. System.out: This is the standard output stream that is used to
produce the result of a program on an output device like the
computer screen.

Here is a list of the various print functions that we use to output


statements:

● print(): This method in Java is used to display a text on the console.


This text is passed as the parameter to this method in the form of
String. This method prints the text on the console and the cursor
remains at the end of the text at the console.
● println(): This method in Java is also used to display a text on the
console. It prints the text on the console and the cursor moves to
the start of the next line at the console.
● printf(): This is the easiest of all methods as this is similar to printf
in C. Note that System.out.print() and System.out.println() take a
single argument, but printf() may take multiple arguments. This is
used to format the output in Java.
● System.err: This is the standard error stream that is used to output
all the error data that a program might throw, on a computer
screen or any standard output device.

Depending on the type of operations, streams can be divided into two


primary classes:

1. Input Stream: These streams are used to read data that must be
taken as an input from a source array or file or any peripheral
device. For eg., FileInputStream, BufferedInputStream,
ByteArrayInputStream etc.
2. Output Stream: These streams are used to write data as outputs
into an array or file or any output peripheral device. For eg.,
FileOutputStream, BufferedOutputStream, ByteArrayOutputStream
etc.
Depending on the types of file, Streams can be divided into two primary
classes which can be further divided into other classes

● ByteStream: This is used to process data byte by byte (8 bits).


Though it has many classes, the FileInputStream and the
FileOutputStream are the most popular ones. The FileInputStream
is used to read from the source and FileOutputStream is used to
write to the destination. Here is the list of various ByteStream
Classes:

● CharacterStream: In Java, characters are stored using Unicode


conventions (Refer this for details). Character stream automatically
allows us to read/write data character by character. Though it has
many classes, the FileReader and the FileWriter are the most
popular ones. FileReader and FileWriter are character streams used
to read from the source and write to the destination respectively.
Here is the list of various CharacterStream Classes:
. SOFTWARE ENGINEERING
36. Software development project management - types of activities, the choice of
methodology and non-technical context.

Software development project management is the use of project


management practices and systems to help accomplish software-related
objectives. It is used by product development teams to deliver projects of
all shapes and sizes and, including new product and software
development, patches and updates, configuration management,
information system development, test-driven development.

Software Management Activities:

- Project Planning - task, which is performed before the production


of software actually starts.

The main outputs from project planning:

project deliverables - the items the project will deliver, which could
range from new software products to patches. It’s common for
software projects to have multiple deliverables.

criteria - will be used to measure project success. Widely used


success criteria for software projects include quality targets and
whether the project was delivered on time and on budget.

creation and assigning tasks

- Scope Management - defines the scope of project; this includes


all the activities, process need to be done in order to make a
deliverable software product. SM creates boundaries of the project
by clearly defining what would be done in the project and what
would not be done. This makes project to contain limited and
quantifiable tasks, which can easily be documented and in turn
avoids cost and time overrun. During Project SM it is necessary to:
Define the scope, Decide its verification and control, Divide the
project into various smaller parts for ease of management, Verify
the scope, Control the scope by incorporating changes to the scope
- Project Estimation - estimation of various measures of the
project. Helps managers to control the project more efficiently and
effectively.

Project estimation may involve:


- Software size estimation - software size may be estimated
either in terms of KLOC (Kilo Line of Code) or by calculating
number of function points in the software. Lines of code
depend upon coding practices and Function points vary
according to the user or software requirement.
- Effort estimation - managers estimate efforts required to
produce the software. Effort estimation can be obtained by
managers’ experience, organization’s historical data or
software size.
- Time estimation - for time estimation efforts required and
software tasks should be divided into subcategories and
smaller tasks. The tasks should be scheduled on a daily basis
or in calendar months. The sum of time required to complete
all tasks in hours or days is the total time invested to
complete the project.
- Cost estimation - for estimating project cost, it is required to
consider size of software, software quality, hardware,
additional software or tools, licenses, skilled personnel with
task-specific skills, travel involved, communication, training
and support
- Execution - phase which spans the active work of the software
development process. It includes design, development,
testing and quality assurance tasks. This work should be
completed through the chosen development workflow. The
role of project management throughout the execution phase
is largely focused around project monitoring - tracking project
progress against time available, and identifying issues which
could influence the team’s progress.
- Completion/Evaluation - final phase of the project cycle.
Software teams should jointly evaluate the project: what
worked really well, what is done badly or unfinished. This will
help the team's improvement in the long run.

Project management methodology - a set of principles and practices


(usually, it’s a framework) that guide you in organizing your projects to
manage your project in the best way possible. Methodologies differ in how
they're structurally organized, and require different deliverables,
workflows, and even project management software development.

Estimations that can help to choose the most suitable


methodology:

Clearly defined goal which isn't going to change

Project is consistent and predictable (i.e. isn’t going to change).


Cost and budget

Team size

Ability to take risks

Flexibility

Timeline

Client/stakeholder collaboration: estimate how involved does the


client/stakeholder need or want to be in the process and if stakeholders
know exactly what they want (and it isn’t going to change).

The most commonly used frameworks:

Agile - one of the most common project management processes. Agile is:
collaborative, fast and effective, iterative and data-backed. The Agile
framework can be used for just about any team, because the principle
behind it is rather universal.

Waterfall - a linear process in which work cascades down (similar to a


waterfall) and is organized in sequential order. This methodology is great
for working on large projects with multiple different stakeholders, because
there are clear steps throughout the project and dependencies that help
track the work needed to reach goals.

Scrum - involves short “sprints” that are used to create project cycles.
These cycles span 1 to 2 weeks at a time and are organized with teams of
10 or less. As sprints are divided into small teams, this approach can
work for both small and large teams. Scrum is most commonly associated
with an Agile framework, because they share similar principles, such as
collaboration and valuing individuals over processes.

Kanban - represents project backlogs using visual elements, specifically


boards. This approach is used by Agile teams to better visualize workflows
and project progress while decreasing the likelihood of bottlenecks. Since
this method doesn’t have a defined process like others, many teams use
it differently. Kanban boards are great for teams of all sizes and
specifically remote-first teams, because the visual capabilities of Kanban
boards help team members stay on track no matter where they are.

Non-technical context:

Successful software development project managers are more than just


senior coders and architecture experts. In addition they must also ensure
that development teams feel properly prepared, supported and motivated.
Failing to give proper attention to this can lead to problems that will
impact on the whole workflow.

Also, a project manager may not have great technical skills, unless he
wants to build those skills as part of preparing to lead the project.
Managers can have a project with well-defined goals, an adequate
schedule, technically skilled people and all the necessary tools, but if the
project team members cannot communicate and collaborate effectively
with each other and with end users, then project success is at risk.
Common problems with non-technical skills include dysfunctional
communication, negative attitudes, uncooperativeness, mistrust,
avoidance, and ineffective negotiations between team members and
users. Such problems must be identified and addressed to improve
individual and team performance. There are tools available that assist in
measuring the effectiveness of the technical skills and processes that
teams use to execute projects, but there are no proven tools to effectively
measure the non-technical skills of software developers.
37. UML (Unified Modeling Language) - its features and its support for various data
models.

UML is a standardized modeling language enabling developers to visualize


how a project is or will be working to simplify all the process of
development. It uses graphic notation to create visual models of software
systems.

The UML features:

- It is a generalized modeling language.


- It’s distinct from other programming languages like C++ or Python
- It is connected with object-oriented analysis and design.
- It is used to visualize the workflow of the system.
- It is a pictorial language, used to generate powerful modeling
artifacts.

UML’s support for various data models:

UML consists of diagrams representing different aspects of the system.


These diagrams are widely used for data modeling.

Structural UML Diagrams:

Class Diagram – The most widely used. It is the building block of all
object oriented software systems. Used to depict the static structure of a
system by showing system’s classes, their methods and attributes. Class
diagrams also help to identify relationships between different classes or
objects.

Composite Structure Diagram – used to represent the internal structure of


a class and its interaction points with other parts of the system.
Represents relationship between parts and their configuration which
determine how the classifier (class, a component, or a deployment node)
behaves. They represent the internal structure of a structured classifier
making the use of parts, ports, and connectors. We can also model
collaborations using composite structure diagrams.

Object Diagram – can be referred to as a screenshot of the instances in a


system and the relationship that exists between them. Since object
diagrams depict behaviour when objects have been instantiated, we are
able to study the behaviour of the system at a particular instant. An
object diagram is similar to a class diagram except it shows the instances
of classes in the system. We depict actual classifiers and their
relationships making the use of class diagrams. On the other hand, an
Object Diagram represents specific instances of classes and relationships
between them at a point of time.

Component Diagram – are used to represent how the physical


components in a system have been organized. We use them for modelling
implementation details. Component Diagrams depict the structural
relationship between software system elements and help us in
understanding if functional requirements have been covered by planned
development. Component Diagrams become essential to use when we
design and build complex systems. Interfaces are used by components of
the system to communicate with each other.

Deployment Diagram – are used to represent system hardware and its


software.It tells us what hardware components exist and what software
components run on them.We illustrate system architecture as distribution
of software artifacts over distributed targets. An artifact is the information
that is generated by system software. They are primarily used when a
software is being used, distributed or deployed over multiple machines
with different configurations.

Package Diagram – used to depict how packages and their elements have
been organized. A package diagram simply shows us the dependencies
between different packages and internal composition of packages.
Packages help us to organise UML diagrams into meaningful groups and
make the diagram easy to understand. They are primarily used to
organise class and use case diagrams.

Behavior Diagrams –

State Machine Diagrams – is used to represent the condition of the


system or part of the system at finite instances of time. It’s a behavioral
diagram and it represents the behavior using finite state transitions. State
diagrams are also referred to as State machines and State-chart
Diagrams . These terms are often used interchangeably.So simply, a state
diagram is used to model the dynamic behavior of a class in response to
time and changing external stimuli.

Activity Diagrams – used to illustrate the flow of control in a system. We


can also use an activity diagram to refer to the steps involved in the
execution of a use case. We model sequential and concurrent activities
using activity diagrams. So, we basically depict workflows visually using
an activity diagram.An activity diagram focuses on condition of flow and
the sequence in which it happens. We describe or depict what causes a
particular event using an activity diagram.
Use Case Diagrams – are used to depict the functionality of a system or a
part of a system. They are widely used to illustrate the functional
requirements of the system and its interaction with external
agents(actors). A use case is basically a diagram representing different
scenarios where the system can be used. A use case diagram gives us a
high level view of what the system or a part of the system does without
going into implementation details.

Sequence Diagram – depicts interaction between objects in a sequential


order i.e. the order in which these interactions take place.We can also use
the terms event diagrams or event scenarios to refer to a sequence
diagram. Sequence diagrams describe how and in what order the objects
in a system function. These diagrams are widely used by businessmen
and software developers to document and understand requirements for
new and existing systems.

Communication Diagram – is used to show sequenced messages


exchanged between objects. A communication diagram focuses primarily
on objects and their relationships. We can represent similar information
using Sequence diagrams,however, communication diagrams represent
objects and links in a free form.

Timing Diagram – a special form of Sequence diagrams which are used to


depict the behavior of objects over a time frame. We use them to show
time and duration constraints which govern changes in states and
behavior of objects.

Interaction Overview Diagram – models a sequence of actions and helps


us simplify complex interactions into simpler occurrences. It is a mixture
of activity and sequence diagrams.
38. Design patterns and programming frameworks - characteristics, examples and
applications.

Design patterns can speed up the development process by providing


tested, proven development paradigms. Effective software design requires
considering issues that may not become visible until later in the
implementation. Reusing design patterns helps to prevent subtle issues
that can cause major problems and improves code readability for coders
and architects familiar with the patterns. Often, people only understand
how to apply certain software design techniques to certain problems.
These techniques are difficult to apply to a broader range of problems.
Design patterns provide general solutions, documented in a format that
doesn't require specifics tied to a particular problem. In addition, patterns
allow developers to communicate using well-known, well understood
names for software interactions. Common design patterns can be
improved over time, making them more robust than ad-hoc designs.
Characteristics of design patterns:

- It is a proven solution to problems that keep recurring.

- They are reusable solutions to common problems.

- Design patterns are not frameworks.

- Design patterns are more abstract and primitive than frameworks.

- Design patterns cannot be directly implemented.

- A design pattern cannot incorporate a framework.

- Patterns may be documented using one of several alternative templates.

- Design patterns can speed up the development process by providing


tested, proven development paradigms.

- Reusing design patterns helps to prevent subtle issues that can cause
major problems and improves code readability for coders and architects
familiar with the patterns.

- Patterns allow developers to communicate using well-known, well


understood names for software interactions.

examples and implementation of the most well-known design


patterns:

Abstract Factory Pattern - provides an interface for creating groups of


dependent objects, which are used by the client, without giving their
exact implementation. For the creation of specific products, which are
available for the user-defined interface, factories based on Factory Method
Pattern or the Prototype Pattern are often used (which is not discussed
here). The main difference between Factory Method Pattern and Abstract
Factory Pattern is the fact that in the former a client receives one product,
whereas in the latter a client gets the whole group of products.

Factory Method Pattern - is one of the best known design patterns. Its
task is to hide details of creating objects from clients and, at the same
time, to provide interface to generate them. Classes implementing
interface decide about class of creating object. A client expects a secured
implementation of an interface or abstract class, but is not interested in a
specific implementation. However, a programmer can easily expand the
portfolio of a factory with additional object classes. When designing your
application it is worth considering whether and application actually needs
the objectives factory. If a product has many classes with a similar base
class and you manipulate objects in the interface or abstract class, then
Factory Method Pattern would definitely be useful.

Prototype Pattern - The prototype pattern is a creational design pattern in


software development. It is used when the type of objects to create is
determined by a prototypical instance, which is cloned to produce new
objects. This pattern is used to avoid subclasses of an object creator in
the client application, like the factory method pattern does and to avoid
the inherent cost of creating a new object in the standard way (e.g., using
the 'new' keyword) when it is prohibitively expensive for a given
application.To implement the pattern, declare an abstract base class that
specifies a pure virtual clone() method. Any class that needs a
"polymorphic constructor" capability derives itself from the abstract base
class, and implements the clone() operation. The client, instead of writing
code that invokes the "new" operator on a hard-coded class name, calls
the clone() method on the prototype, calls a factory method with a
parameter designating the particular concrete derived class desired, or
invokes the clone() method through some mechanism provided by
another design pattern.

Singleton Pattern - provides at most one instance of a given class and


global access to its references. Very often is presented as an anti-pattern
as it breaks two SOLID rules (single responsibility principle and
open/closed principle), sometimes it is overused and very often is treated
as object substitute of a global variable. It also happens to be problematic
during implementation in multi-threaded environment. Use this pattern if
your application requires global access to the same resource.
A programming framework is an abstract structure that offers a
standardized and reusable environment for developing and deploying
specific applications. By using a framework, the programmer doesn’t have
to code the common base structure of an app and can focus their efforts
on the unique parts.

Characteristics of programming framework:

Inversion of Control (IoC): The traditional flow of control is dictated by


the caller, i.e., the code. However, in frameworks, the flow of control is
inverted, and as such, is dictated by the framework.

Extensibility: A framework allows the user to extend its feature-set by


incorporating custom user code or overriding selective sections.

Non-Modifiable Framework Code: A framework can be extended but not


modified. This means users can add new features if they want, but they
can’t alter or change the framework’s source code. In other words – you
can build upon it but not rebuild it.

Examples and applications of programming frameworks:

web frameworks - more specifically, back-end web frameworks - help


developers create web applications, also called dynamic websites. These
are websites that you don’t build with just HTML, JavaScript, and CSS.
Instead, they use a programming language to interact with a database
and then generate the final content. The web frameworks make this
process way easier. Many of them—such as the successful and influential
Ruby On Rails framework—rely on conventions to spare developers from
having to write a lot of code or create complex configurations files in
order to get basic functionality working. Many of the most popular web
frameworks adopt a pattern known as MVC, which stands for model-view-
controller. The MVC pattern intends to make development easier by
clearly separating the concerns in an application into three well-defined
layers. Frameworks that use the MVC pattern include Django, ASP.NET
MVC, CakePHP, and the already mentioned Ruby on Rails.

front-end frameworks - Web frameworks can also be front-end


frameworks. “Front-end” here means the client-side part of the
application. In other words, it’s what’s executed in the user’s browser, as
opposed to the back end, which is executed in a server. Front-end
frameworks allow developers to leverage technologies such as HTML,
CSS, and, most importantly, JavaScript to create applications that feel as
rich as desktop apps. The most famous front-end frameworks are
definitely Angular and React.
39. Software quality assurance and software testing - standards, methods and criteria.

Software quality assurance (SQA) is the ongoing process that ensures


the software product meets and complies with the organization’s
established and standardized quality specifications. SQA is a set of
activities that verifies that everyone involved with the project has
correctly implemented all procedures and processes. SQA works parallel
to software development, an ongoing activity applied throughout the
software development life cycle. Instead of making quality checks after
completion, software quality assurance checks for quality issues in each
development phase. Not only for the consumer’s sake but for the sake of
the software product itself, it is important that businesses use a credible
SQA process to establish a baseline of expectations for the product.
Software quality assurance is a reliable means of producing high-quality
software. There shouldn’t be much justification as to why you wouldn’t
want high-quality software, but if that’s not the case consider the other
reasons why improving the software quality is of the utmost importance.
First, a high-quality software product will save you time and money. As a
business, providing a good that’s worth buying is one of your primary
objectives. If you’re building software, software quality assurance can
confirm that your good, or software product, is worth buying. The
problem with a product that is not worth buying is that you lose money
making the product, and you don’t get a dime of that money back if
there’s no profit earned. To that same end, delivering a high-quality
product implies less maintenance over time because your software
product will be resilient in the first place. Therefore, you can spend the
least amount of time and money on upkeep, if the product needs future
maintenance at all. Altogether, software quality assurance remains a key
factor in scaling your business as well as preserving a good reputation for
your brand.

There are two main approaches to software quality assurance:

defect management approach - works by counting and managing defects.


Defects encompass a large range of errors from poor data handling to bad
code. In defect management, once your development team has identified
a defect, they assign it a category given the severity of the defect. Then,
the team takes specific actions to address the counted defects. Usually,
such an approach operates best with clear and concise control charts to
measure and improve development process capability. Process capability
determines how well processes manage to meet standards.

attributes approach - directs attention to a number of quality


characteristics. Depending on who you ask, there are between six and a
dozen or more of these characteristics. This is likely because some
attributes overlap or fall under one another. For instance, suitability is a
matter of functionality. And usability extends learnability. That said, just
these six basic attributes will cover what you need to know for the
moment: Functionality, Reliability, Usability, Efficiency, Maintainability,
Portability.

Software Quality Assurance Standards:

Quality is hard to define. When you think of something that is of good


quality, does that mean that something is excellent — because that is a
subjective measure — or simply fit to fulfill its purpose? While on the
surface software quality assurance might seem just as ambiguous, there
are several different guidelines for SQA that are well-recognized in the
industry. It’s kind of like the scientific process, except there are multiple.
Software development teams typically use one or a few of the following
standards explained below.

ISO 9000 - defines a family of standards, with the ISO 9000 and ISO
9001 being standards within the family. The International Organization for
Standardization (ISO) first published the ISO 9000 family in 1987. For the
ISO 9000, there are several principles that put significant focus on a
software product’s ability to meet customers’ needs.

The ISO 9000 principles are as follows:

- Customer focus
- Leadership
- Engagement of people
- Process Approach
- Improvement
- Evidence-based decision making
- Relationship management

Currently, the ISO 9000 is one of the more widely used criteria for quality
management systems (QMS). More than a million businesses and
organizations across the world in 170 countries have an ISO 9001
certification.

Capability Maturity Model Integrated (CMMI) - This standard is popular


amongst contracts for software development from the United States
government. In 2009, approximately 70% of adopters of CMMI in the US
were associated with the military and/or government. The government is
deeply involved with the development of CMMI, namely the Department
of Defense (DoD). Along with the government’s help, the Software
Engineering Institute (SEI) at Carnegie Mellon University created CMM —
the precedent to CMMI — in 1991. This team dons the name CMMI
Product Team. In 2000, the same team published CMMI. Unlike the ISO
9000, CMMI hasn’t quite gone global yet. Several thousand businesses in
94 distinct countries adopt CMMI but ISO 9000 is still more pervasive.
CMMI is particularly focused on process improvement. With CMMI,
organizations measure their alignment to quality assurance based on
maturity.

There are five levels to meet by this measure:

Initial: No processes have been followed or documented.

Repeatable: Some processes have been followed and repeatable.

Defined: The set of processes have been defined, documented, and are
subject to improvement.

Managed: At this level, organizations use metrics to measure and control


processes.

Optimizing: Focus on process improvement.

Testing Maturity Model (TMM) - is based on CMMI. This model delineates


standards for software testing. Like CMMI, TMMi uses the concept of
maturity levels.

The five maturity levels are:

- Initial
- Managed (Test Policy & Strategy, Test Planning, Test Monitoring and
Control, Test Design & Execution, Test Environment)
- Defined (Test Organization, Test Training Program, Test Lifecycle &
Integration, Non-Functional Testing, Peer Reviews)
- Measured (Test Measurement , Product Quality Evaluation,
Advanced Reviews)
- Optimization (Defect Prevention, Test Process Optimization, Quality
Control)

Software Quality Assurance methods:

- Creating an SQA Management Plan: The foremost activity includes


laying down a proper plan regarding how the SQA will be carried out
in your project. Along with what SQA approach you are going to
follow, what engineering activities will be carried out, and it also
includes ensuring that you have a right talent mix in your team.
- Setting the Checkpoints: - The SQA team sets up different
checkpoints according to which it evaluates the quality of project
activities at each checkpoint/project stage. This ensures regular
quality inspection and working as per the schedule.
- Apply software Engineering Techniques: - Applying some software
engineering techniques aids a software designer in achieving high-
quality specification. For gathering information, a designer may use
techniques such as interviews and FAST (Functional Analysis
System Technique). Later, based on the information gathered, the
software designer can prepare the project estimation using
techniques like WBS (work breakdown structure), SLOC (source line
of codes), and FP(functional point) estimation.
- Executing Formal Technical Reviews: - An FTR is done to evaluate
the quality and design of the prototype. In this process, a meeting
is conducted with the technical staff to discuss regarding the actual
quality requirements of the software and the design quality of the
prototype. This activity helps in detecting errors in the early phase
of SDLC and reduces rework effort in the later phases.
- Having a Multi- Testing Strategy: - By multi-testing strategy, we
mean that one should not rely on any single testing approach,
instead, multiple types of testing should be performed so that the
software product can be tested well from all angles to ensure better
quality.
- Enforcing Process Adherence: - This activity insists the need for
process adherence during the software development process. The
development process should also stick to the defined procedures.

This activity is a blend of two sub-activities which are explained


below in detail:

(i) Product Evaluation: This activity confirms that the software


product is meeting the requirements that were discovered in the project
management plan. It ensures that the set standards for the project are
followed correctly.

(ii) Process Monitoring: This activity verifies if the correct steps


were taken during software development. This is done by matching the
actually taken steps against the documented steps.

- Controlling Change: - In this activity, we use a mix of manual


procedures and automated tools to have a mechanism for change
control. By validating the change requests, evaluating the nature of
change and controlling the change effect, it is ensured that the
software quality is maintained during the development and
maintenance phases.
- Measure Change Impact: - If any defect is reported by the QA
team, then the concerned team fixes the defect. After this, the QA
team should determine the impact of the change which is brought
by this defect fix. They need to test not only if the change has fixed
the defect, but also if the change is compatible with the whole
project. For this purpose, we use software quality metrics which
allows managers and developers to observe the activities and
proposed changes from the beginning till the end of SDLC and
initiate corrective action wherever required.
- Performing SQA Audits: - The SQA audit inspects the entire actual
SDLC process followed by comparing it against the established
process. It also checks whatever reported by the team in the status
reports were actually performed or not. This activity also exposes
any non-compliance issues.
- Maintaining Records and Reports: - It is crucial to keep the
necessary documentation related to SQA and share the required
SQA information with the stakeholders. The test results, audit
results, review reports, change requests documentation, etc. should
be kept for future reference.
- Manage Good Relations: - In fact, it is very important to maintain
harmony between the QA and the development team. We often
hear that testers and developers often feel superior to each other.
This should be avoided as it can affect the overall project quality.

Software testing - a process of evaluating and verifying that a software


product or application does what it is supposed to do. The benefits of
testing include preventing bugs, reducing development costs and
improving performance.

Benefits of using software testing:

Cost-Effective: It is one of the important advantages of software testing.


Testing any IT project on time helps you to save your money for the long
term. In case if the bugs caught in the earlier stage of software testing, it
costs less to fix.

Security: It is the most vulnerable and sensitive benefit of software


testing. People are looking for trusted products. It helps in removing risks
and problems earlier.

Product quality: It is an essential requirement of any software product.


Testing ensures a quality product is delivered to customers.

Customer Satisfaction: The main aim of any product is to give satisfaction


to their customers. UI/UX Testing ensures the best user experience.
Software testing standards are a set of rules or standards that are
expected to be met in a particular product or service offered by a
company. Compliance to these set of rules is important for a company as
it defines the extent to which a company is performing its duty legally and
is not engaged in any sort of malpractice. Moreover, doing so also
ensures the delivery of high quality products.

There are currently five standards in the series:

ISO/IEC 29119-1: Deals with concepts and definitions of software

ISO/IEC 29119-2: Deals with test processes in a product

ISO/IEC 29119-3: Deals with test documentation of the product

ISO/IEC 29119-4: Deals with testing techniques and strategies

ISO/IEC 29119-5: Deals with keyword-based software testing

Software testing methods:

help developers deal with different types of bugs (bugs may range from a
missing semicolon to a critical business requirement). Thus, software
testing is an essential part of a test driven development environment.

Static Analysis - examines all possible behaviors that might arise during
run time. The traditional static analysis includes: code review, code
inspection, algorithm analysis, proof of correctness. Example is compiler
optimization. Software testers perform static analysis through an
examination of documents. These documents include specification
requirements, models, design architecture, and legacy codes (when
upgrading an application).

Dynamic Analysis - involves actual program execution to find possible


errors and failed functionalities. Also, part of dynamic analysis is
behavioral and performance properties of the software, as in Static
analysis. Hence, these two analyses give better effectiveness if used
together.

Black Box - testers perform testing without knowing the overall content of
the software. They know what are the necessary inputs and expected
outputs, but not the process. The black box testing method tests the
functionality of an application based on the requirement specification. It
does not focus on the internal structure or code of the application. Black
box techniques include: Boundary Value analysis, Equivalence
Partitioning, Decision Tables, Domain Tests, State Models.
White Box - this testing technique is used in development to examine the
program structure and business logic. Testers perform validation of the
entire code structure of an application. White Box Testing Techniques
include:

- Statement Coverage – examines all the programming statements.


- Branch Coverage – Performs a series of test runs to ensure detailed
testing of all the branches.
- Path Coverage – Perform testing on all the possible paths to cover
each statement and branch.

why do we perform White Box Testing:

- To check correct execution of all the independent paths within a


module.
- To verify all logical decisions on their true and false values.
- To determine that all loops are within their boundaries and the
operational bounds of internal data structures are valid.
- to define logical error concerning functions, conditions, or controls
related to design and implementation.
- to define the design errors due to the difference between the logical
flow of the program and the actual environment.
- to define typographical and error syntax.

Scripted Box - tester follows an outline, which is also known as script.


This script is essential in the testing method as it includes test cases and
its corresponding test steps. Indeed, these steps are scripted and are
suitable for fulfilling a specified requirement. Scripted box testing works
well with functional and non-functional testing.

Exploratory - this is where testers have full autonomy to work around the
software application based on their instinct. This method is perfect for
finding hidden risks or errors. For example, a redundant button that may
confuse the users. Exploratory testing understands how actual users
navigate the application. On the other hand, scripted testing ensures that
the software is ready for deployment. Hence, software testers and
product owners always use these two methods in parallel.

Manual - gives fast and accurate feedback. Also, it is less expensive as it


doesn’t involve automation tools and processes. But human judgment can
also make this method less reliable. For example, when there is a limited
number of testers for a large-scale project, it can cause bottlenecks,
which will exhaust testers and often result in several undetected bugs.

Automated - uses scripts and tools, which makes this method more
reliable as the test runs automatically. As a result, it finds more bugs
compared to a human tester. Also, testers are allowed to record the
automation process, allowing them to reuse and execute the same kind of
testing operations. However, the tools used to run automation testing are
expensive and have its limitations, which reduces the scope of
automation. Therefore, most testers prefer to use both automation and
manual testing. These methods provide fast bug identification while
delving into UI’s visual aspects (e.g., colors, font, sizes, contrast, button
sizes, etc).

Waterfall - is used when the development phase is complete. It is ideal for


projects with defined requirements and is unlikely to change. Advantages
of waterfall testing include a well-structured and well-documented testing
process. Testers and developers don’t need to communicate as they work
independently. Additionally, all the features of the project are developed
and delivered together. It makes the testing process manageable as
every stage has its deliverables and a strict review method. For its
disadvantages, it requires excessive documentation with a rigid structure.
It is not ideal for large-scale projects as testing happens only at the end
of the project. This is only suitable if bugs are easier solved, which is
rarely the case in software development.

Agile - methodology, where the entire project team participates in all the
activities. The requirements evolve as the iterations progress, through
collaboration between the customer and the self-organizing teams. As
Coding and Testing are done interactively and incrementally, during the
course of development, the end-product would be of quality and ensures
customer requirements.

Software testing criteria:

testing at scale - as scale and scope of testing often expands over time,
software testing partners must be able to scale along with the digital
products and to allocate sufficient resources to the products, on both the
management and tester sides. The software testing partner must be able
to keep up with your ongoing needs. For example, you might require new
testers to meet increased delivery demands or deliver a fresh perspective
of a new feature.

Test coverage for devices and platforms - as there are more devices and
platforms every year, it is nearly impossible to test all the changes of
devices - their operational systems, platforms and networks, but you
must validate as many as possible, especially the ones your customers
use. Software testing partners should expand test coverage for devices
and platforms that are outside the scope of testability for many
organizations. Every year, there are new iOS and Android devices and
their OS versions, not to mention more feature-rich connected devices,
such as automobiles, refrigerators, plugs and in-home voice assistants. A
quality software testing partner should provide resources that enable you
to expand test coverage for all the necessary devices. Also, as alternative
platforms like virtual reality are becoming more popular, there is a need
for a QA partner who can keep up and use testers all around the world to
validate functionality and services, and keep the revenue stream rolling
in.

Ability to find the right testers - not everyone can test a product well. QA
partner must be able to provide testers that meet your needs. testers for
one app might be the wrong fit for another. For example, there is a new
customer rewards feature launching in selected markets. The retailer
might require testers who: live in the areas where you’ll launch; likely or
already shop at the retailer; pay with specific payment methods; are
willing to visit a store to test out the rewards card; have a track record of
success testing retail apps or reward programs; will agree to a strict non-
disclosure agreement. You can’t effectively meet your test objectives
without the right testers. A software testing partner should give you the
ability to select testers for future participation.

Comprehensive software testing - an app must meet not only functional


requirements, but also user expectations. While functional tests cover a
lot of ground, specialized testing programs can help address areas that
lack real-world test coverage. Payment testing, for example, helps
organizations ensure they can secure revenue for their apps. Similarly,
accessibility testing helps businesses tap into a user base with disabilities.
QA partners should help organizations implement accessibility from the
design stage and maintain conformance throughout the software
development life cycle. Comprehensive software testing also means
evaluating the user experience - what delights users about the app,
where do they struggle to interact with features, can all users sufficiently
read or hear the functionality? Software testing partners must provide
actionable UX insights that enable the organization to deliver better
customer experience and retain users.

Localized testing to reach users in your markets - software testing partner


must be able to provide localized perspectives from in-market digital
experts to validate the app in the market and conditions that you require.
Localization goes beyond simply making sure the app functions properly
in a different region. Localized testing efforts should confirm many details
specific to the user’s geography, including:

Language - applications must be able to communicate with a user, but


also connect with them. Simple language translations can lose nuance and
introduce confusion, where some words have different meanings in other
languages.

Currency - if an application can’t accept payments in the local user’s


currency, it can devastate your revenue generation — not to mention user
retention. In addition to payment testing, localized testing can identify
regional irregularities with payments — residents of some countries, for
example, might prefer a type of payment an app can’t support.

Regulations - what’s legal in one country, isn’t necessarily legal in


another. Localized testing can ensure that you’re on the right side of the
law — and the border — with your apps.

Culture - when you fail to understand your users, it can be easy to offend
them. It can be not only simple words or phrases, but also images, which
users might find distasteful. Localized testing experts and users can help
deliver an app that engages — and doesn’t offend — users.

Adaptability and responsiveness - find a software testing provider that


adapts to your workflow and changing needs. If you plan to deploy new
functionality into a new market, customize a software testing strategy for
that release — and make sure the partner can deliver on those needs.
Responsiveness is crucial too.

Fit with the software release rhythm - it is important to release high-


quality software on a tight schedule. Establish parameters for timelines
and development methodology at the outset of your testing agreement,
and ensure that the software testing provider can meet your needs.
Where possible, the QA partner should integrate with the software you
already use, for bug tracking.

Testing expertise in your industry - Many software testing partners offer


domain experience in QA, but it is better if testers can offer test
automation or coding skills as well. Seek out a software testing partner
that offers both domain experience and knowledge in your particular
industry. Make testing expertise work for you, with digital experts tailored
to your particular industry and technical needs.

True innovation in testing - Software testing needs to get done quickly


and comprehensively - this is why ongoing innovation in testing is
necessary. While some testing methods are tried and true, software
testing partners should be ready for new approaches and technologies
that enable swifter delivery of quality software.

Ease of use - work with a QA partner must be intuitive and clear. The QA
partner should provide all the evidence needed to resolve a bug, including
reproduction steps, tester screenshots and video recordings to help you
easily triage and remediate defects, not waste time with out-of-scope
bugs and unclear results.
40. Software requirements - their kinds, their specification methods and their role in
the software development process.

Types/kinds of software requirements:

Functional requirements - basic facilities that the system should offer.


They are represented in the form of input to be given to the system, the
operation performed and the output expected. They are basically the
requirements stated by the user which one can see directly in the final
product. For example, in a hospital management system, a doctor should
be able to retrieve the information of his patients. Each high-level
functional requirement may involve several interactions or dialogues
between the system and the outside world. In order to accurately
describe the functional requirements, all scenarios must be enumerated.
There are many ways of expressing functional requirements, f.e natural
language, a structured or formatted language.

Non-functional requirements - These are basically the quality constraints


that the system must satisfy according to the project contract. They
basically deal with issues like: Portability, Security, Maintainability,
Reliability, Scalability, Performance, Reusability, Flexibility

Non-functional requirements are classified into following types:

- Interface constraints
- Performance constraints: response time, security, storage space,
etc.
- Operating constraints
- Life cycle constraints: maintainability, portability, etc.
- Economic constraints

The process of specifying non-functional requirements requires the


knowledge of the functionality of the system, as well as the knowledge of
the context within which the system will operate.

Domain requirements - requirements which are characteristic of a


particular category or domain of projects. The basic functions that a
system of a specific domain must necessarily exhibit come under this
category. For instance, in an academic software that maintains records of
a school or college, the functionality of being able to access the list of
faculty and list of students of each grade is a domain requirement. These
requirements are therefore identified from that domain model and are not
user specific.

Business requirements - are high-level business objectives or needs that


are required for an organization to maximize profits, minimize expenses,
meet regulatory requirements, or improve service. These requirements
often take the form of business cases created by investors, end
customers, marketing departments, software designers, or project
managers.

User interface requirements - include objectives the system will allow to


achieve, actions that can be performed by end-users, or information they
should have access to from the user interface.

Specification methods of software requirements:

- Define your product's purpose.


- Describe what you're building.
- Detail the individual requirements.
- Deliver it for approval.

Specification method is a sequence of activities leading to the


development of a product, called a specification. A method should provide
enough guidance on how to conduct the activities and on how to evaluate
the quality of the final product. A specification is a precise description of
the client’s requirements. The best specification methods define how the
software will interact when embedded in hardware or when connected to
other software.

Role of software requirements in the software development


process:

- establish the agreement between your team and the customer on


what the application is supposed to do. Without a description of
what features will be included and details on how the features will
work, the users of the software can't determine if the software will
meet their needs.
- minimize the development cost, time and effort required by
developers to achieve desired goals. A good SR defines how an
application will interact with system hardware, other programs and
human users in a wide variety of real-world situations.
- ensure project consistency over time - relate to both customer and
business needs, provide teams with clarity, and help them stay
focused on quality assurance.
- allow you to check whether needed requirements have been met or
not at any moment, so you can implement changes before the
project becomes unprofitable.
- can support change management. It’s common for projects to
undergo sudden changes due to the rise of new technologies,
design defects, test case failures, market changes, or competitive
responses. Poorly executed changes result in design conflicts,
outdated documentation, and plenty of wasted time and energy.
Poor change management drives up the cost of the project and
delays a final delivery. By coordinating changes with your
requirements, you’ll be able to identify their impact and timely
notify everyone affected.
- provide a base for collaboration. Modern agile teams are often
interdisciplinary and consist of people with different skillsets, from
coding to marketing. Requirements describe all these aspects of a
product to provide a single source of truth for everyone involved in
the project and allow them to see how their work fits into the bigger
picture. Thanks to that kind of project management, teams will also
be able to predict the impact of every single change and easily track
whole testing progress.
- supplement project documentation. Allows to produce reports
quickly and develop auditable records that support compliance due
to tracing the regulatory requirements.
COMPUTER NETWORKS
41. Application layer services and protocols on the basis of the HTTP.

HTTP is a protocol for fetching resources such as HTML documents. It is


the foundation of any data exchange on the Web and it is a client-server
protocol, which means requests are initiated by the recipient, usually the
Web browser. A complete document is reconstructed from the different
sub-documents fetched, for instance, text, layout description, images,
videos, scripts, and more.

Application layer is the topmost layer of the protocol hierarchy. It is the


layer where actual communication is initiated. It uses the services of the
transport layer, the network layer, the data link layer, and the physical
layer to transfer data to a remote host. Application layer interface directly
interacts with the application and provides common web application
services. The application layer also makes a request to the presentation
layer. Application layer is the highest level of open systems, providing
services directly for the application process.

Application layer functions/services:

- provides a facility by which users can forward several emails and it


also provides a storage facility.
- allows users to access, retrieve and manage files in a remote
computer.
- allows users to log on as a remote host.
- provides access to global information about various services.
- provides services which include: e-mail, transferring files,
distributing results to the user, directory services, network
resources and so on.
- provides protocols that allow software to send and receive
information and present meaningful data to users.
- handles issues such as network transparency, resource allocation
and so on.
- serves as a window for users and application processes to access
network services.
- performs application layer functions.
- specifies the shared protocols and interface methods used by hosts
in a communication network.
- helps to identify communication partners, and synchronizing
communication.
- allows users to interact with other software applications.
- in this layer, data is in visual form, which makes users truly
understand data rather than remembering or visualize the data in
the binary format (0’s or 1’s).
- basically interacts with Operating System (OS) and thus further
preserves the data in a suitable manner.
- receives and preserves data from it’s previous layer, which is
Presentation Layer (which carries in itself the syntax and semantics
of the information transmitted).
- the protocols which are used in this application layer depend upon
what information users wish to send or receive.
- performs host initialization followed by remote login to hosts.

Application layer protocols:

The application layer provides several protocols which allow


communication between applications - allow any software to easily send
and receive information and present meaningful data to its users. To
ensure smooth communication, application layer protocols are
implemented the same on source host and destination host.

Features of Application Layer Protocols:

- define the process for both parties which are involved in


communication.
- define the type of message being sent or received from any side
(either source host or destination host).
- define basic syntax of the message being forwarded or retrieved.
- define the way to send a message and the expected response.
- define interaction with the next level.

Some of the protocols provided by the application layer:

TELNET: Telnet stands for Telecommunications Network. This protocol is


used for managing files over the Internet. It allows the Telnet clients to
access the resources of Telnet server. Telnet uses port number 23.

DNS: DNS stands for Domain Name System. The DNS service translates
the domain name (selected by user) into the corresponding IP address.
For example- If you choose the domain name as www.abcd.com, then
DNS must translate it as 192.36.20.8 (random IP address written just for
understanding purposes). DNS protocol uses the port number 53.

DHCP: DHCP stands for Dynamic Host Configuration Protocol. It provides


IP addresses to hosts. Whenever a host tries to register for an IP address
with the DHCP server, DHCP server provides lots of information to the
corresponding host. DHCP uses port numbers 67 and 68.
FTP: FTP stands for File Transfer Protocol. This protocol helps to transfer
different files from one device to another. FTP promotes sharing of files
via remote computer devices with reliable, efficient data transfer. FTP
uses port number 20 for data access and port number 21 for data control.

SMTP: SMTP stands for Simple Mail Transfer Protocol. It is used to


transfer electronic mail from one user to another user. SMTP is used by
end users to send emails with ease. SMTP uses port numbers 25 and 587.

HTTP: HTTP stands for Hyper Text Transfer Protocol. It is the foundation
of the World Wide Web (WWW). HTTP works on the client server model.
This protocol is used for transmitting hypermedia documents like HTML.
This protocol was designed particularly for the communications between
the web browsers and web servers, but this protocol can also be used for
several other purposes. HTTP is a stateless protocol (network protocol in
which a client sends requests to server and server responses back as per
the given state), which means the server is not responsible for
maintaining the previous client’s requests. HTTP uses port number 80.

NFS: NFS stands for Network File System. This protocol allows remote
hosts to mount files over a network and interact with those file systems
as though they are mounted locally. NFS uses the port number 2049.

SNMP: SNMP stands for Simple Network Management Protocol. This


protocol gathers data by polling the devices from the network to the
management station at fixed or random intervals, requiring them to
disclose certain information. SNMP uses port numbers 161 (TCP) and 162
(UDP).
42. Transport layer services on the basis of the TCP.

Transport layer - provides a total solution for reliable communications.


At the transport layer TCP/IP ports are listen.

IP - Internet Protocol - is a protocol, or set of rules, for routing and


addressing packets of data so that they can travel across networks and
arrive at the correct destination. When an IP communication session must
begin or end, the transport layer is used to build this connection.

TCP - Transmission Control Protocol - one of the most important


protocols in the Transport Layer. TCP provides reliable data delivery
service with error detection and correction. TCP relies on the transport
layer to effectively control communications between two hosts.
Applications that require the transport protocol to provide reliable data
delivery use TCP because it verifies that data is delivered across the
network accurately and in the proper sequence.

Transport layer services:

Address Mapping - mapping of transport address onto the network


address. When a session entity requests to send a transport service data
unit (TSDU) to another session entity, it sends its transport service access
point address as its identification. The transport entity then determines
the network service access point (NSAP) address.

Assignment of Network Connection - the transport entity assigns a


network connection for carrying the transport protocol data units
(TPDUs). The transport entity establishes this assigned network
connection. In some of the transport protocols, recovery from network
disconnection is allowed. In such protocols, whenever a disconnection
occurs, the transport entity reassigns the transport of TPDUs to a different
network connection.

Multiplexing of Transport Connections - for optimum network link


uses, the transport entity can create multiple end-to-end transport
connections to the network connection, referred to as multiplexing. There
are various TSDUs (multiplexed) identified by the receiving transport
entity using the transport connection endpoint identifier (TCEPI), attached
to each TSDU by the sending transport entity.

Splitting of Transport Connection - when the service quality offered by


the network service is less than the required quality of service or when
greater resilience is required against network connection failures, then
splitting is done by the transport entity. Splitting means TPDUs belonging
to one transport connection may be sent over different network
connections. Splitting requires the re-sequencing because it results in the
reordering of TSDUs.

Establishment of Transport Connection - the transport layer


establishes the transport connection by sending a request. For
establishing a link, it uses the T-CONNECT service primitives. The
transport entity provides the quality of service, requirement, and collect
addresses services.

Data Transfer - 2 types -

regular data transfer - user can request to transfer user data with any
integral number of octets (units of digital information in computing). This
transfer is transparent, i.e., user data boundaries are preserved during
the transfer, and there are no constraints on the content and number of
octets. The mode of data transfer can be done in two ways
simultaneously.

expedited data transfer - has a distinct control flow, and can pass all the
data queue with maximum priority for delivery. It is a user optional or
optional provider service. Maximum octets are 16.

Segmentation and Concatenation of TPDUs - has 2 functions -

segmenting function - the transport entity divides the transport service


data unit into several transport protocol data units, each with a separate
header - Protocol Control Identifier. SF is used when the network service
cannot support the transport protocol data unit's size containing an
unsegmented transport service data unit. A reassembly process is
performed at the transmitting end for such TPDUs.

concatenating function - the reverse function of segmenting one - enables


the mapping of several TPDUs onto a single NSDU (Network Service Data
Unit). These TPDUs may belong to the same or several transport
connections. If they belong to different transport connections, they must
be travelling in the exact directions. At the receiving end, a separation
function is performed by the transport entity, which identifies the
boundary of different TPDUs. Concatenation is done for improving the
efficiency of utilization of the network service. On concatenation, there
are some restrictions as to which type of TPDUs can be concatenated so
that their boundaries should be identified by the transport entity.

Flow Control - the transport entity uses a modified form of sliding


window protocol for flow control. This flow control is required because the
transport layer may experience back pressure from the network layer. In
the mechanism, the window size is variable and controlled by the
receiver. A credit allocated is sent to the receiver's sender, which
indicates how many TPDUs can be received by it.

Error Recovery - the errors at this level can be introduced due to TPDU
errors, protocol errors or signal failure conditions of network connections,
i.e., reset or release of network connections. Such errors occurring at
layer 3 are reported to the transport layer. The TPDU errors can be in the
form of lost TPDU, duplicated TPDU, re-ordering of sequence, or content
errors. The duplicate TPDUs are discarded, lost are acknowledged to
resend. In the recording, they are re-sequenced, and content errors are
detected by incorporating error detection bytes in TPDUs by the transport
entity. Such TPDUs with content errors are discarded and treated as lost,
and hence they are also acknowledged. In the case of protocol errors, the
connection is released, and in the case of signal failure errors,
reassignment of network connection and resynchronization is done.

Sequence Numbering - each TPDU is given a sequence number by a


transport entity that is seven bits long in the normal operations mode.
This sequence numbering is done to provide flow control and error
recovery. In the case of extended mode, the sequence number can be 31
bits long.
43. Network layer routing protocols on the basis of the OSPF protocol.

A routing protocol - specifies how routers communicate with each other


to distribute information that enables them to select routes between
nodes on a computer network. Routing algorithms determine the specific
choice of route. Each router has a prior knowledge only of networks
attached to it directly.

2 primary routing protocol types commonly used on the Internet -

Distance vector protocols (DVP) - advertise their routing table to all


directly connected neighbors at regular frequent intervals using a lot of
bandwidth and are slow to converge. When a route becomes unavailable,
all router tables must be updated with that new information.

Disadvantage - with each router having to advertise that new information


to its neighbors, it takes a long time for all routers to have a current
accurate view of the network. DVP uses fixed length subnet masks which
aren’t scalable.

Link state protocols (LSP) - advertise routing updates only when they
occur, which uses bandwidth more effectively. Routers don’t advertise the
routing table which makes convergence faster. The routing protocol will
flood the network with link state advertisements to all neighbor routers
per area in an attempt to converge the network with new route
information. LSP uses variable length subnet masks, which are scalable
and use addressing more efficiently.

OSPF (Open Shortest Path First) protocol - is an Interior Gateway


Protocol (IGP) for the Internet, used to distribute IP routing information
throughout a single Autonomous System (AS) in an IP network. OSPF is a
link-state routing protocol, which means that the routers exchange
topology information with their nearest neighbors. The main advantage of
a link state routing protocol like OSPF is that the complete knowledge of
topology allows routers to calculate routes that satisfy particular criteria.
44. Data link layer services on the basis of the Ethernet or the 802.11 protocol family
(WiFi).

Ethernet is a family of wired computer networking technologies


commonly used in local area networks (LAN), metropolitan area networks
(MAN) and wide area networks (WAN). Is a Data Link Layer protocol.

Data Link Layer generally represents a protocol layer in a program


which controls the sending of data between source and destination
machines through the physical network media.

802.11 protocol family - family of specifications developed by the IEEE


for wireless LAN technology. 802.11 specifies an over-the-air interface
between a wireless client and a base station or between two wireless
clients.

Data Link Layer services:

Unacknowledged Connectionless Service - provides delivery of the


independent, self-contained messages without any error or flow control (it
means that if anyhow frame is lost, there will be no attempt to detect or
determine loss or recovery from it). The source machine generally sends
independent frames to the destination machine without having a
destination machine to acknowledge these frames. There is no connection
established among the sending or source machine and destination or
receiving machine before data transfer or release after data transfer.
Example - Ethernet.

Acknowledged Connectionless Service - packet delivery is


acknowledged with help of stop and wait for protocol. Each transmitted
frame is acknowledged individually and then the sender usually knows
whether or not these transmitted data frames were received safely. This
mode gives the user a possibility to send or transfer data and request a
data return at the same time. This service is generally useful over several
unreliable channels, like wireless systems, Wi-Fi services, etc.

Acknowledged Connection-Oriented Service - data is transferred


after the establishing of the connection between sender and receiver.
Each of the transmitted frames receives an individual number, to
guarantee that each of frames is received only once and in an
appropriate order and sequence.
45. Information security methods in e-Banking.

Anti-virus and anti-malware protection - detect and prevent viruses


and malicious software.

Firewalls - sort data coming in and out of computer networks, blocking


unauthorized access and stopping traffic from unsafe internet sources.

Secure Socket Layer (SSL) encryption - creates a secure connection


with the browser when the user does such things as logging in, filling out
an application, registering for services and so on. “https://” at the
beginning of the page’s URL/web address or the lock symbol near this
address guarantee that SSL encryption is active on the used page.

Cookies - by placing a cookie (a piece of text stored on a user’s


computer by their web browser) on a computer after the user's initial
login, banks can then recognize or authenticate this computer when the
user logs in to his account again. If a user uses a new computer to log in
to his account or erases his cookies, he will be required to enter additional
information at the time of his next login.

Multi-factor authentication - can take many forms and requires the


use of 2 or 3 different authentication factors. For example, a user enters a
password or PIN code when he logs in to his bank’s website. If the site
needs additional verification from him, it can ask a question for which
only he knows the answer or send a security code to a device that he
connected to his account during first registration.

Credential confidentiality - banks do not share usernames or


passwords of their users with anyone.

Automatic logout - many banks automatically log their users out of the
secure session after a period of inactivity to help prevent others from
seeing or using their online accounts.

Biometric authentication - many banks have integrated fingerprint


authentication into their mobile banking apps. Other forms of biometric
security measures include “eyeprint” verification and facial and voice
recognition. These verification methods are easy to use and hard for
criminals to replicate.

Limited liability - most banks offer some type of security guarantee.


Depending on the terms of the policy, the user's responsibility for
unauthorized transactions is limited. In other words, if the user reports
unauthorized transactions on his account in a timely manner, the charges
may not be his responsibility.
MULTIMEDIA
46. Colour models.

2 main colour models: RGB and CMY(K).


● Additive Colour Model: It is also named as “RGB model.” RGB stands for
Red, Green, Blue. The Additive colour model uses a mixture of light to
display colours. The perceived colour depends on the transmission of light.
It is used in digital media. For Example – Computer Monitor, Television
etc.
● Subtractive Colour Model: It is also named as “CMYK Model.” CMYK
stands for Cyan, Magenta, Yellow, and Black. The Subtractive model uses
a reflection of light to display the colours. The perceived colour depends
on the reflection of light. The CMYK model uses printing inks. For
Example– Paint, Pigments, and colour filter etc.

[ R G B ] =[ 1 11 ] −[ C M Y ][ C M Y ] =[ 11 1 ] −[ R G B ]

● HSV: The image consists of three channels. Hue, Saturation and Value
are three channels. This colour model does not use primary colours
directly. It uses colour in the way humans perceive them. HSV colour
when is represented by a cone.
Hue is a colour component. Since the cone represents the HSV model, the
hue represents different colours in different angle ranges.
Saturation as the name suggest
describes the percentage of the colour.
Sometimes this value lies in the 0 to 1
range. 0 being the grey and 1 being
the primary colour. Saturation
describes the grey colour.
The value represents the intensity of
the colour chosen. Its value lies in
percentage from 0 to 100. 0 is black
and 1 is the brightest and reveals the
colour.
HSV model is used in histogram equalization and converting grayscale
images to RGB colour images.
● YIQ: YIQ is the most widely colour model used in Television broadcasting.
Y stands for luminance part and IQ stands for chrominance part. In the
black and white television, only the luminance part (Y) was broadcast. The
Y value is similar to the grayscale part. The colour information is
represented by the IQ part. There exist a formula to convert RGB into YIQ
and vice-versa.
YIQ model is used in the conversion of grayscale images to RGB colour
images.
47. Shaders.

A shader is simply a program that runs in the graphics pipeline and tells
the computer how to render each pixel. These programs are called
shaders because they're often used to control lighting and shading
effects, but there's no reason they can't handle other special effects.
Shaders are written in a special shading language. They are mostly run on
GPU.

There are stages of shaders and each of them represents a type of


programmable processing.
● Vertex shaders – handles processing of individual vertices
● Tessellation control and Evaluation shaders – takes result of tessellation
(stage where patches of vertex data are subdivided into a smaller
primitives) operation and computes the interpolated position as well as
other per vertex data.
● Geometry shaders – stage that governs the processing or primitives
● Fragment shaders – stage that processes fragments (collection of values)
produced by rasterizer into a set of colours and a single depth value.
● Compute shaders – used for computing arbitrary information, generally
used for tasks not related to rendering triangles and pixels.
There is a possibility to combine different stages into one whole pipeline. Each
stage has its own inputs and outputs, as they are written in different languages.
48. Compression techniques in MPEG standards.

Short for Moving Picture Experts Group, and pronounced m-peg, is a


working group of the ISO (International Organisation for
Standardisation). The term also refers to the family of digital video
compression standards and file formats developed by the group. MPEG
generally produces better-quality video than competing formats, such as
Video for Windows, Indeo and QuickTime.

Most major MPEG standards.


● MPEG-1
● MPEG-2
● MPEG-3
● MPEG-4
● MPEG-7
● MPEG-21
Lossy compression. Refers to data compression techniques in which some
amount of data is lost. Lossy compression technologies attempt to eliminate
redundant or unnecessary information. Most video compression technologies,
such as MPEG, use a lossy technique.
MPEG algorithms compress data to form small bits that can be easily
transmitted and then decompressed. MPEG achieves its high compression rate
by storing only the changes from one frame to another, instead of each entire
frame. The video information is then encoded using a technique called Discrete
Cosine Transform (DCT - Short for Discrete Cosine Transform, a technique
for representing waveform data as a weighted sum of cosines. DCT itself does
not lose data; rather, data compression technologies that rely on DCT
approximate some of the coefficients to reduce the amount of data). MPEG uses
a type of lossy compression, since some data is removed. But the diminishment
of data is generally imperceptible to the human eye.
49. Aliasing. How to avoid aliasing? Aliasing vs. sampling rate.

Aliasing in computer graphics, the process by which smooth curves and


other lines become jagged because the resolution of the graphics device
or file is not high enough to represent a smooth curve. The problem of
jagged edges technically occurs due to distortion of the image when scan
conversion is done with sampling at a low frequency, which is also known
as Undersampling.

The sampling is a techniques that is used to convert some analogue


continuous signals, or in graphics case pictures, into a set of discrete
values. With the sampling rate not high enough, it creates a loss of
information from the original source and the phenomenon as Aliasing
occurs. Hence in case the sampling rate is high enough, the Aliasing effect
will not occur.

Methods of AntiAliasing
● Using high-resolution display: One way to reduce aliasing effect and
increase sampling rate is to simply display objects at a higher resolution.
Using high resolution, the jaggies become so small that they become
indistinguishable by the human eye. Hence, jagged edges get blurred out
and edges appear smooth. Practical applications: Apple devices, OLED
displays.
● Post filtering (Supersampling): In this method, we are increasing the
sampling resolution by treating the screen as if it’s made of a much more
fine grid, due to which the effective pixel size is reduced. But the screen
resolution remains the same. Now, intensity from each subpixel is
calculated and average intensity of the pixel is found from the average of
intensities of subpixels. Thus we do sampling at higher resolution and
display the image at lower resolution or resolution of the screen, hence
this technique is called supersampling. This method is also known as post
filtration as this procedure is done after generating the rasterized image.
Practical applications: In gaming, SSAA (Supersample Antialiasing) or
FSAA (full-scene antialiasing) is used to create best image quality. It is
often called the pure AA and hence is very slow and has a very high
computational cost. This technique was widely used in early days when
better AA techniques were not available. Different modes of SSAA
available are: 2X, 4X, 8X, etc. denoting that sampling is done x times
(more than) the current resolution. A better style of AA is MSAA
(multisampling Antialiasing) which is a faster and approximate style of
supersampling AA.
● Pre-filtering (Area Sampling): In area sampling, pixel intensities are
calculated proportional to areas of overlap of each pixel with objects to be
displayed. Here pixel colour is computed based on the overlap of scene’s
objects with a pixel area. For example: Suppose, a line passes through
two pixels. If pixel area overlaps with different colour areas, then the
final pixel colour is taken as an average of colours of the overlap area.
This method is also known as pre-filtering as this procedure is done
BEFORE generating the rasterized image.
● Pixel phasing: It’s a technique to remove aliasing. Here pixel positions
are shifted to nearly approximate positions near object geometry. Some
systems allow the size of individual pixels to be adjusted for distributing
intensities which is helpful in pixel phasing.
50. Human-Computer Interaction (HCI): Nielsen-Molich heuristics.

Heuristics poster link

In creating design there are no specific rules, as the point in it is first of


all the creativity. Instead, the heuristics are used, in this case created by
Nielsen and Molich. They serve as the most used principle of design until
now.
1. Visibility of system status: The design should always keep users
informed about what is going on, through appropriate feedback within a
reasonable amount of time.
2. Match between system and the real world: The design should speak
the users' language. Use words, phrases, and concepts familiar to the
user, rather than internal jargon. Follow real-world conventions, making
information appear in a natural and logical order.
3. User control and freedom: Users often perform actions by mistake.
They need a clearly marked "emergency exit" to leave the unwanted
action without having to go through an extended process.
4. Consistency and standards: Users should not have to wonder whether
different words, situations, or actions mean the same thing. Follow
platform and industry conventions.
5. Error prevention: Good error messages are important, but the best
designs carefully prevent problems from occurring in the first place. Either
eliminate error-prone conditions, or check for them and present users with
a confirmation option before they commit to the action.
6. Recognition rather than recall: Minimize the user's memory load by
making elements, actions, and options visible. The user should not have
to remember information from one part of the interface to another.
Information required to use the design (e.g. field labels or menu items)
should be visible or easily retrievable when needed.
7. Flexibility and efficiency of use: Shortcuts — hidden from novice users
— may speed up the interaction for the expert user such that the design
can cater to both inexperienced and experienced users. Allow users to
tailor frequent actions.
8. Aesthetic and minimalist design: Interfaces should not contain
information which is irrelevant or rarely needed. Every extra unit of
information in an interface competes with the relevant units of information
and diminishes their relative visibility.
9. Help users recognize, diagnose, and recover from errors: Error
messages should be expressed in plain language (no error codes),
precisely indicate the problem, and constructively suggest a solution.
10. Help and documentation: It’s best if the system doesn’t need any
additional explanation. However, it may be necessary to provide
documentation to help users understand how to complete their tasks.
FUNDAMENTALS OF ELECTRONICS AND DIGITAL
TECHNOLOGY
51. Basic passive element implementations (resistors, capacitors, coils)

A passive element is an electrical component that does not generate


power, but instead dissipates, stores, and/or releases it. Passive elements
include resistances, capacitors, and coils (also called inductors). These
components are labelled in circuit diagrams as Rs, Cs and Ls,
respectively. In most circuits, they are connected to active elements,
typically semiconductor devices such as amplifiers and digital logic chips.
● Resistors A resistor is a primary type of physical component that is used
in electronic circuits. It has two (interchangeable) leads. The material
placed internally between the two leads of a resistor opposes (restricts)
the flow of current. The amount of that opposition is called its resistance,
which is measured in ohms (Ω). Resistors are used to control the various
currents in areas of a circuit and to manage voltage levels at different
points therein by producing voltage drops. When a voltage is applied
across a resistor, current flows through it. Ohm's law for resistors is E =
IR, where E is the voltage across the resistor, R is the resistance of the
resistor, and I is the current flowing through the resistor. That current is
proportional to the applied voltage, and inversely proportional to the
resistance. Thus, as resistance goes up, the current through the element
comes down, so that at high resistances the current is very small.
● Capacitors A capacitor is another primary type of physical component
used in electronic circuits. It has two leads and is used to store and
release electric charge. A capacitor's ability to store charge is referred to
as its capacitance, measured in farads (F).

A typical capacitor takes the form of two conductive plates


separated by an insulator (dielectric). This type of circuit element
cannot pass direct current (DC) because electrons cannot flow
through the dielectric. However, a capacitor does pass alternating
current (AC) because an alternating voltage causes the capacitor to
repeatedly charge and discharge, storing and releasing energy.
Indeed, one of the major uses of capacitors is to pass alternating
current while blocking direct current, a function called 'AC coupling'.

It react differently to direct and alternating current. In first case it


gets as much charge as it can hold and in the latter, the current
effectively flows through the capacitor with a specific amount of
opposition (called reactance).
● Coils A coil, also called an inductor, is yet another primary type of
physical component that is used in electronic circuits. It has two leads and
is typically implemented as one or more windings (loops) of conductive
wire. That wire is often but not necessarily formed around a core of iron or
steel or some other magnetic material. Current through the coil induces a
magnetic field that serves as a store of energy. Inductance is measured in
henries (H).

More specifically, a current flowing through a wire generates a


magnetic field, the direction of which is to the right relative to the
flow of the current, as described by the 'right-hand rule' (see Figure
4). If the wire is coiled, the fluxes are in alignment. According to
Lenz's law, changes in the coil's magnetic field generate a counter-
electromotive force (and an induced current) that opposes those
changes. Thus, coils can be used in electronic circuits to restrict the
flow of alternating current while allowing direct current to pass.

Right-Hand Rule: Current (I) flowing through a conductor


produces a magnetic field (B) that circles to the right around the
conductor.
52. RC low-pass filter. Filter’s cut-off frequency and bandwidth.

A Low Pass Filter is a circuit that can be designed to modify, reshape or


reject all unwanted high frequencies of an electrical signal and accept or
pass only those signals wanted by the circuits designer.

In other words they “filter-out” unwanted signals and an ideal filter will
separate and pass sinusoidal input signals based upon their frequency. In
low frequency applications (up to 100kHz), passive filters are generally
constructed using simple RC (Resistor-Capacitor) networks, while
higher frequency filters (above 100kHz) are usually made from RLC
(Resistor-Inductor-Capacitor) components.

Cutoff frequency (also known as corner frequency, or break frequency)


is defined as a boundary in a system’s frequency response at which
energy flowing through the system begins to be attenuated (reflected or
reduced) rather than passing through.

The cutoff frequency or corner frequency in electronics is the


frequency either above or below which the power output of a circuit, such
as a line, amplifier, or electronic filter (e.g. a high pass filter) has fallen to
a given proportion of the power in the passband.53. Harvard architecture
vs. von Neumann architecture.
For any filtering circuits such as RC circuits, the cutoff frequency is a very
important characteristic. At this point, the amount of attenuation due to
the filter starts to increase swiftly.

In signal processing, bandwidth is defined as the difference between


upper cutoff frequency and low cutoff frequency. The frequency f2 lies
along with a high-frequency range and f1 in the low-frequency range. This
represents the power level of one–half of the power at reference
frequency in the mid-range frequency. Since the change is not noticeable,
the audio amplifier has a flat response from f1 to f2.
53. Harvard architecture vs von Neumann architecture.

Von Neumann Architecture is a digital computer architecture whose


design is based on the concept of stored program computers where
program data and instruction data are stored in the same memory. This
architecture was designed by the famous mathematician and physicist
John Von Neumann in 1945.

Harvard Architecture is the digital computer architecture with separate


storage and separate buses (signal pathways) for instruction and data. It
was basically developed to overcome the bottleneck of Von Neumann
Architecture.

Differences:

- N: It is ancient computer architecture based on the stored program


computer concept.

H: It is modern computer architecture based on the Harvard Mark I


relay-based model (which stored instructions on punched tape (24
bits wide) and data in electro-mechanical counters).

- N: It is cheaper in cost and has a simpler design.


- N: Same physical memory address is used for instructions and data
(so instructions are fetched over the same data path used to fetch
data - this means that a CPU cannot simultaneously read an
instruction and read or write data from or to the memory).

H: Separate physical memory address is used for instructions and


data (the CPU can both read an instruction and perform a data
memory access at the same time, even without a cache - thus
Harvard architecture computer can be faster for a given scheme
complexity because instruction fetches and data access do not
contend for a single memory pathway).

- N: There is a common bus for data and instruction transfer.

H: Separate buses are used for transferring data and instructions.

- N: Two clock cycles are required to execute single instruction.

H: An instruction is executed in a single cycle.

- N: CPU can not access instructions and read/write at the same


time.

H: CPU can access instructions and read/write at the same time.


- N: It is used in personal computers and small computers.

H: It is used in micro controllers and signal processing.


54. Methods of event handling in a microcontroller.

A microcontroller is a compact integrated circuit designed to govern a


specific operation in an embedded system. A typical microcontroller
includes a processor, memory and input/output (I/O) peripherals on a
single chip.

Sometimes referred to as an embedded controller or microcontroller unit


(MCU), microcontrollers are found in vehicles, robots, office machines,
medical devices, mobile radio transceivers, vending machines and home
appliances, among other devices. They are essentially simple miniature
personal computers (PCs) designed to control small features of a larger
component, without a complex front-end operating system (OS).

Microcontrollers must provide real-time (predictable, though not


necessarily fast) response to events in the embedded system they are
controlling. When certain events occur, an interrupt system can signal the
processor to suspend processing the current instruction sequence and to
begin an interrupt service routine (ISR, or "interrupt handler") which will
perform any processing required based on the source of the interrupt,
before returning to the original instruction sequence.
55. Common communication interfaces in a microcontroller.
 

Communication protocols are rules required to exchange information


between computers and instruments.

Serial Peripheral Interface (SPI)

SPI is a common communication protocol used in various devices like SD


card modules, RFID card reader modules, etc. SPI has a higher data
transfer rate. In SPI, devices communicate in a master-slave relationship.
The master is the controlling device which usually is a microcontroller,
while the slave usually a sensor, display, or memory chip takes instruction
from the master. In SPI, since there are no start and stop bits, data can
be streamed continuously and thus data can be transferred without
interruption.

Inter-Integrated Circuit (I2C)

It is a half-duplex bi-directional two-wire bus system for transmitting and


receiving data between masters and slaves. In I2C only two signals are
used regardless of the number of devices on the bus. Signals used are
clock and data. Each slave here has a 7-bit address and the master must
know these addresses so that it can communicate with a particular slave.
The master can write data to one or even more than one slaves. It can
also request data from any slave. Thus, all transmissions are initiated and
terminated by a master.

Universal Asynchronous Receiver / Transmitter (UART)

UART (Universal asynchronous receiver transmitter), as the name


indicates, is an asynchronous communication protocol which does not use
any clock source for synchronizing the data, so there are more chances of
losing the data over UART protocol. UART has two wires for its
transmitting and receiving ends. The main purpose of a transmitter and
receiver line is to transmit and receive serial data which is intended for
serial communication.

Controller Area Network (CAN)

CAN is a serial communications bus. The specification of CAN has high


immunity to electrical interference and the ability to self-diagnose and
repair data errors. These features have led to CAN’s popularity in a
variety of industries which includes automation, medical, and
manufacturing to name a few. The CAN bus is a broadcast type of bus.
This means that all nodes can hear all the transmissions. There is no
facility to send a particular message to a specific node. All nodes will pick
up all the traffic. The CAN hardware provides local filtering so that each
node may react only on the interesting messages.

Universal Serial Bus (USB)

USB hosts, also known as master devices, initiate all the communication
that occurs over the USB bus. Typically, a computer or other controllers
are considered to be the master, only responding to other devices if
requesting certain information. The host and slave devices are connected.
The slave device is programmed in such a way that it provides the host
device with the information it needs to operate. Typically, slave devices
include USB flash drives, keyboards, and other such devices. It is
important for host and slave devices to be able to effectively
communicate with each other. If either one is not able to perform its job
function, the communication between the two devices would be
interrupted.
. OPERATING SYSTEMS
56. Classification of operating systems.
● Multiuser OS: In a multiuser OS, more than one user can use the same
system at a same time through the multi I/O terminal or through the
network. For example: windows, Linux, Mac, etc. A multiuser OS uses
timesharing to support multiple users.
● Multiprocessing OS: A multiprocessing OS can support the execution of
multiple processes at the same time. It uses multiple number of CPU. It is
expensive in cost however, the processing speed will be faster. It is
complex in its execution. Operating system like Unix, 64 bit edition of
windows, server edition of windows, etc. are multiprocessing.
● Multiprogramming OS: In a multiprogramming OS more than one
programs can be used at the same time. It may or may not be
multiprocessing. In a single CPU system , multiple program are executed
one after another by dividing the CPU into small time slice. example:
Windows, Mac, Linux, etc.
● Multitasking OS: In a multitasking system more than one task can be
performed at the same time but they are executed one after another
through a single CPU by time sharing. For example: Windows, Linux, Mac,
Unix, etc.

Multitasking OS are of two types:


1. Pre-empetive multitasking - the OS allows CPU time slice to
each program. After each time slice, CPU executes another task.
Example: Windows XP
2. Co-operative multitasking - a task can control CPU as long as
it requires . However, it will free CPU to execute another
program if it doesn’t require CPU. Example: windows 3.x,
multifinder, etc.
● Multithreading: A program in execution is known as process. A process
can be further divided into multiple sub-processers. These sub-processers
are known as threads. A multi-threading OS can divide process into
threads and execute those threads. This increases operating speed but
also increases the complexity. For example: Unix, Server edition of Linux
and windows.
● Batch Processing: A batch processing is a group of processing system in
which all the required input of all the processing task is provided initially.
The result of all the task is provided after the completion of all the
processing. Its main functions are:
o Multiple task are processed
o User cannot provide input in between the processing
o It is appropriate only when all the inputs are known in advance
o It requires large memory
o CPU ideal time is less
o Printer is the appropriate output device
o It is old processing technique and rarely used at present
● Online Processing: It is an individual processing system in which the
task is processed on individual basis as soon as they are provided by the
user. It has features like:
o Individual task is processed at a time
o User can provide input in between processing
o It is appropriate when all inputs ate not known in advance
o It doesn’t require large memory
o CPU ideal time is more
o Monitor is appropriate output device
o It is modern processing technique and mostly used in present
57. Process and thread scheduling in operating systems.

Process scheduling is the activity of the process manager that handles


the removal of the running process from the CPU and the selection of
another process on the basis of a particular strategy.

Process scheduling is an essential part of a Multiprogramming operating


systems. Such operating systems allow more than one process to be
loaded into the executable memory at a time and the loaded process
shares the CPU using time multiplexing.

The Operating System maintains the following important process


scheduling queues −
● Job queue − This queue keeps all the processes in the system.
● Ready queue − This queue keeps a set of all processes residing in main memory, ready
and waiting to execute. A new process is always put in this queue.
● Device queues − The processes which are blocked due to unavailability of an I/O device
constitute this queue.
The OS can use different policies to manage each queue (FIFO, Round Robin,
Priority, etc.). The OS scheduler determines how to move processes between
the ready and run queues which can only have one entry per processor core on
the system.
Schedulers
Schedulers are special system software which handle process scheduling in various ways. Their main
task is to select the jobs to be submitted into the system and to decide which process to run.
Schedulers are of three types −
● Long-Term Scheduler – job scheduler
● Short-Term Scheduler – dispatcher. Works on CPU
● Medium-Term Scheduler – works with swapping processes and time-
sharing
Context Switch
A context switch is the mechanism to store and restore the state or context of a
CPU in Process Control block so that a process execution can be resumed from
the same point at a later time. Using this technique, a context switcher enables
multiple processes to share a single CPU. Context switching is an essential part
of a multitasking operating system features.
Thread scheduling
The scheduling of thread involves two boundary scheduling:
● Scheduling of user level threads (ULT) to kernel level threads (KLT) via
leightweight process (LWP) by the application developer.
● Scheduling of kernel level threads by the system scheduler to perform
different unique os functions.
Leightweight Process (LWP) :
Light-weight process are threads in the user space that acts as an interface for
the ULT to access the physical CPU resources. Thread library schedules which
thread of a process to run on which LWP and how long. The number of LWP
created by the thread library depends on the type of application. In the case of
an I/O bound application, the number of LWP depends on the number of user-
level threads. This is because when an LWP is blocked on an I/O operation, then
to invoke the other ULT the thread library needs to create and schedule another
LWP. Thus, in an I/O bound application, the number of LWP is equal to the
number of the ULT. In the case of a CPU bound application, it depends only on
the application. Each LWP is attached to a separate kernel-level thread.

For every system call to access the kernel resources, a Kernel Level thread is
created and associated to separate LWP by the system scheduler.
58. Process and thread synchronization in computer programs and its support by
computer systems and operating systems.

Thread synchronization is defined as a mechanism which ensures that two


or more concurrent processes or threads do not simultaneously execute
some particular program segment known as critical section. Processes'
access to critical section is controlled by using synchronization techniques.
When one thread starts executing the critical section (serialized segment
of the program) the other thread should wait until the first thread
finishes. If proper synchronization techniques[1] are not applied, it may
cause a race condition where the values of variables may be
unpredictable and vary depending on the timings of context switches of
the processes or threads.

Other than mutual exclusion, synchronization also deals with the


following:
● deadlock, which occurs when many processes are waiting for a shared
resource (critical section) which is being held by some other process. In
this case, the processes just keep waiting and execute no further;
● starvation, which occurs when a process is waiting to enter the critical
section, but other processes monopolize the critical section, and the first
process is forced to wait indefinitely;
● priority inversion, which occurs when a high-priority process is in the
critical section, and it is interrupted by a medium-priority process. This
violation of priority rules can happen under certain circumstances and
may lead to serious consequences in real-time systems;
● busy waiting, which occurs when a process frequently polls to determine
if it has access to a critical section. This frequent polling robs processing
time from other processes.
One of the challenges for exascale algorithm design is to minimize or reduce
synchronization. Synchronization takes more time than computation, especially
in distributed computing. Reducing synchronization drew attention from
computer scientists for decades.
Implementation of synchronization:
● Spinlock
● Barrier
● Semaphore
Windows, Linux (Mac?) provide features for synchronisation in that OS.
59. Operating memory management mechanisms used in operating systems.

Memory Management is the process of controlling and coordinating


computer memory, assigning portions known as blocks to various running
programs to optimize the overall performance of the system.

Memory Management Techniques


● Single Contiguous Allocation: It is the easiest memory management
technique. In this method, all types of computer’s memory except a small
portion which is reserved for the OS is available for one application. For
example, MS-DOS operating system allocates memory in this way. An
embedded system also runs on a single application.

● Partitioned Allocation: It divides primary memory into various memory


partitions, which is mostly contiguous areas of memory. Every partition
stores all the information for a specific task or job. This method consists of
allotting a partition to a job when it starts & unallocated when it ends.
● Paged Memory Management: This method divides the computer’s
main memory into fixed-size units known as page frames. This hardware
memory management unit maps pages into frames which should be
allocated on a page basis.
● Segmented Memory Management: Segmented memory is the only
memory management method that does not provide the user’s program
with a linear and contiguous address space. Segments need hardware
support in the form of a segment table. It contains the physical address of
the section in memory, size, and other data like access protection bits and
status.
60. Virtual memory mechanism: pros and cons.

Virtual Memory is a storage mechanism which offers user an illusion of


having a very big main memory. It is done by treating a part of secondary
memory as the main memory. In Virtual memory, the user can store
processes with a bigger size than the available main memory.

Reasons for using virtual memory:


● Whenever your computer doesn’t have space in the physical memory it
writes what it needs to remember to the hard disk in a swap file as virtual
memory.
● If a computer running Windows needs more memory/RAM, then installed
in the system, it uses a small portion of the hard drive for this purpose.
Example of usage:
● Let’s assume that an OS requires 300 MB of memory to store all the
running programs. However, there’s currently only 50 MB of available
physical memory stored on the RAM.
● The OS will then set up 250 MB of virtual memory and use a program
called the Virtual Memory Manager(VMM) to manage that 250 MB.
● So, in this case, the VMM will create a file on the hard disk that is 250 MB
in size to store extra memory that is required.
● The OS will now proceed to address memory as it considers 300 MB of
real memory stored in the RAM, even if only 50 MB space is available.
● It is the job of the VMM to manage 300 MB memory even if just 50 MB of
real memory space is available.
Advantages of Virtual Memory
● Virtual memory helps to gain speed when only a particular segment of the
program is required for the execution of the program.
● It is very helpful in implementing a multiprogramming environment.
● It allows you to run more applications at once.
● It helps you to fit many large programs into smaller programs.
● Common data or code may be shared between memory.
● Process may become even larger than all of the physical memory.
● Data / code should be read from disk whenever required.
● The code can be placed anywhere in physical memory without requiring
relocation.
● More processes should be maintained in main memory, which increases
effective use of CPU.
● Each page is stored on a disk until it is required after that, it will be
removed.
● It allows more applications to be run at the same time.
● There is no specific limit on the degree of multiprogramming.
● Large programs should be written, as virtual address space available is
more compared to physical memory.
Disadvantages of Virtual Memory
● Applications may run slower if the system is using virtual memory.
● Likely takes more time to switch between applications.
● Offers lesser hard drive space for your use.
● It reduces system stability.
● It allows larger applications to run in systems that don’t offer enough
physical RAM alone to run them.
● It doesn’t offer the same performance as RAM.
● It negatively affects the overall performance of a system.
● Occupy the storage space, which may be used otherwise for long term
data storage.

You might also like