1. Discuss the various generations of computers.
Generations of Computers:
First Generation:
Year - 1940 – 1956
Component: Vacuum tubes
Merits/ Demerits
Big in Size
Consumed more Power
Malfunction due to overheat
Machine Language was used
Ex: ENIAC,EDVAC
Second Generation:
Year: 1956 – 1964
Component: Transistors
Merits/ Demerits
Smaller Compared to First Generations
Generated Less Heat
Consumed less Power
Punched card were used
Machine Language as well as Assembly language was used
Ex: IBM 1401, IBM 1620
Third Generation:
Year: 1964 – 1971
Component: Integrated Circuits (IC)
Merits/ Demerits
Computer were smaller, faster and more reliable
Consumed less power
High Level Languages were used
Ex: IBM 360 series
Fourth Generation:
Year: 1971 – 1980
Component: Very Large Scale Integrated Circuits (VLSI)
Merits/ Demerits
Smaller and Faster
Microcomputer series such as IBM and APPLE were developed.
Portable Computers were introduced.
Fifth Generation:
Year: 1980 –till date
Component: Ultra Large Scale Integrated Circuits (ULSI)
Merits/ Demerits
Parallel Processing.
Super Conductors
Computers size was drastically reduced.
Can recognize Image and Graphics.
Introduction to Artificial Intelligence and Expert System.
Sixth Generation:
Year: In Future
Merits/ Demerits
Parallel and Distributed computing.
Computer have become smarter, faster and smaller.
Development of Robotics.
Natural Language Processing.
Development of voice Recognition software.
2. Explain the basic components of a computer with a neat diagram.
Basic components of a computer:
The computer is the combination of hardware and software.
Hardware is the physical component of a computer like,
a. Motherboard,
b. memory devices,
c. monitor,
d. keyboard etc.,
Software is the set of programs or instructions.
Both hardware and software together make the computer system to
function.
Input Unit
Input unit is used to feed any form of data to the computer, which can be stored
in the memory unit for further processing.
Example:
a. Keyboard,
b. Mouse, etc.
Central Processing Unit
CPU is the major component which interprets and executes software
instructions.
It also controls the operation of all other components such as memory,
input and output units.
It accepts binary data as input, process the data according to the
instructions and provide the result as output.
The CPU has three components which are,
a. Control unit,
b. Arithmetic and logic unit (ALU)
c. Memory unit.
Arithmetic and Logic Unit
The ALU is a part of the CPU where various computing functions are
performed on data.
The ALU performs arithmetic operations such as addition, subtraction,
multiplication, division and logical operations.
The result of an operation is stored in internal memory of CPU. The logical
operations of ALU promote the decision-making ability of a computer.
Control Unit
The control unit controls the flow of data between the CPU, memory and I/O
devices.
It also controls the entire operation of a computer.
Output Unit
An Output Unit is any hardware component that conveys information to users in
an understandable form.
Example:
a. Monitor,
b. Printer
Memory Unit
The Memory Unit is of two types which are,
a. Primary memory
b. Secondary memory.
Primary memory
1. The primary memory is used to temporarily store the programs and data
when the instructions are ready to execute.
2. The Primary Memory is volatile, that is, the content is lost when the power
supply is switched off.
3. The Random Access Memory (RAM) is an example of a main memory
Secondary memory.
1. The secondary memory is used to store the data permanently.
2. The Secondary memory is non volatile, that is, the content is available even
after the power supply is switched off.
3. Hard disk, CD-ROM and DVD ROM are examples of secondary memory.
2. How the read and write operations are performed by a processor? Explain.
The Central Processing Unit(CPU) has a Memory Data Register (MDR) and a
Memory Address Register (MAR).
The Memory Data Register (MDR) keeps the data which is transferred between
the Memory and the CPU. The Program Counter (PC) is a special register in the
CPU which always keeps the address of the next instruction to be executed.
The Arithmetic and Logic unit of CPU places the address of the memory to be
fetched, into the Memory Address Register.
A bus is a collection of wires used for communication between the internal
components of a computer.
The address bus is used to point a memory location. A decoder, a digital circuit is
used to point to the specific memory location where the word can be located.
The address register is connected with the address bus, which provides the
address of the instruction. A data bus is used to transfer data between the
memory and the CPU.
The data bus is bidirectional and the address bus is unidirectional. The control
bus controls both read ana write operations.
The read operation fetches data from memory and transfers to MDR. A single
control line performs two operations like Read/Write using 1 or 0.
Also, the write operation transfers data from the MDR to memory.
The word in the RAM has the same size (no. of bits) as the Memory Data Register
(MDR). If the processor is an 8-bit processor like Intel 8085, its MDR and the
word in the RAM both have 8 bits.
If the size of the MDR is eight bits, which can be connected with a w7ord in the
memory which is also eight bits size. The data bus has eight parallel wires to
transfer data either from MDR to word or word to MDR based on the
control(Read or write).
This control line is labeled as R/W, which becomes 1 means READ operation and
0 means WRITE operation.
3. Explain the Process management algorithms in operating systems.
Process management is function that includes creating and deleting processes
(program) and providing mechanisms for processes to communicate and
synchronize with each other.
A system task, such as sending output to a printer or screen, can also be called as
a Process.
A computer consists of a collection of processes; they are classified as two categories:
Operating System processes which is executed by system code
User Processes which is execute by user code
All these processes can potentially execute concurrently on a single CPU.
The following algorithms are mainly used to allocate the job (process) to the processor.
1. FIFO
2. SJF
3. Round Robin
4. Based on Priority
FIFO (First In First Out) Scheduling:
This algorithm is based on queuing technique.
Assume that a student is standing in a queue (Row) to get grade sheet from
his/her teacher.
The other student who stands first in the queue gets his/her grade sheet first
and leaves from the queue (Row).
Followed by the next student in the queue gets it corrected and so on. This is the
basic logic of the FIFO algorithm.
Technically, the process that enters the queue first is executed first by the CPU,
followed by the next and so on. The processes are executed in the order of the
queue (row).
SJF (Shortest Job First) Scheduling:
This algorithm works based on the size of the job being executed by the CPU.
Consider two jobs A and B.
1) A = 6 kilo bytes 2) B = 9 kilo bytes
First the job “A” will be assigned and then job “B” gets its turn.
Round Robin Scheduling
The Round Robin (RR) scheduling algorithm is designed especially for time
sharing systems.
Jobs (processes) are assigned and processor time in a circular method.
For example take three jobs A, B, C. First the job A is assigned to CPU then job B
and job C and then again A, B and C and so on.
Based On Priority
The given job (process) is assigned based on a Priority.
The job which has higher priority is more important than other jobs.
Take two jobs A and B. Let the priority of A be 5 and priority B be 7.
Job B is assigned to the processor before job A.
[Link] Files and Folders
You can use the search box on the Start menu to quickly search a particular folder
or file in the computer or in a specific drive.
To find a file or folder:
1. Click the Start button, the search box appears at the bottom of the start menu.
2. Type the name of the file or the folder you want to search. Even if you give the
part of the file or folder name, it will display the list of files or folders starting
with the specified name.
3. The files or the folders with the specified names will appear, if you click that file,
it will directly open that file or the folder.
4. There is another option called “See more results” which appears above the
search box.
5. If you click it, it will lead you to a Search Results dialog box where you can click
and open that file or the folder.
Searching Files or folders using Computer icon
1. Click Computer Icon from desktop or from Start menu.
2. The Computer disk drive screen will appear and at the top right corner of that
screen, there is a search box option.
3. Type the name of the file or the folder you want to search. Even if you give the
part of the file or folder name, it will display the list of files or folders starting
with the specified name.
4. Just click and open that file or the folder.
[Link] is an entry control loop? Explain any one of the entry-controlled loop with
suitable example.
In loop, if the condition checked in the beginning of execution of the loop is called
entry control loop. for loop and while loop are the entry control loop because the text
expression is evaluated before entering into a loop.
While loop
A while loop is a control flow statement that allows the loop statements to be
executed as long as the condition is true. The while loop is an entry-controlled loop
because the test-expression is evaluated before entering into a loop.
The while loop syntax is:
while (Test expression)
{
Body of the loop;
}
Statement-x
The control flow and flow chart of the while loop is
shown below.
In while loop, the test expression is
evaluated and if the test expression result is true, then the body of the loop is executed
and again the control is transferred to the while loop. When the test expression result is
false the control is transferred to statement-x.
6. Explain Call by value method with suitable example.
Call by value Method
This method copies the value of an actual parameter into the formal parameter
of the function. In this case, changes made to formal parameter within the function will
have no effect on the actual parameter.
[Link] are the advantages of oops?
Advantages of OOP:
1. Re-usability
2. Redundancy:
3. Easy Maintenance:
4. Security:
Re-usability:
“Write once and use it multiple times” you can achieve this by using class.
Redundancy:
Inheritance is the good feature for data redundancy.
If you need a same functionality in multiple class you can write a common class
for the same functionality and inherit that class to sub class.
Easy Maintenance:
It is easy to maintain and modify existing code as new objects can be created
with small differences to existing ones.
Security:
Using data hiding and abstraction only necessary data will be provided thus
maintains the security of data.
[Link] are the rules for operator overloading?
Rules for operator overloading
Precedence and Associativity of an operator cannot be changed.
No new operators can be created, only existing operators can be overloaded.
Cannot redefine the meaning of an operator’s procedure. You cannot change how
integers are added. Only additional functions can be given to an operator
Overloaded operators cannot have default arguments.
When binary operators are overloaded, the left hand object must be an object of
the relevant class