- Explain any two application layer protocol.
- Explain WWW and HTTP.
- What is E-mail? How it works? Which protocol it uses?
- Explain the architectural overview of the World Wide Web.
- Explain Client side world wide web and server side world web.
- Describe the Built in HTTP request method.
- Explain the basic function of E-mail.
- Explain MIME.
- Explain the Domain Name system.
- Explain the Domain Resource Records.
- Explain socket Programming.
- Explain Client and server communication in brief.
- Explain Virtual Circuit Network.
- What is Datagram? Explain Datagram Network.
- Virtual Circuit Vs Datagram Networks.
- Describe Router. / Explain in detail Router.
- What is Switching Fabric?
- What is routing?
- Explain Distance Vector Routing.
- Explain link state routing with all the five steps in detail.
- Write about OSPF. Which four classes of routers are distinguished by OSPF?
- Explain in detail OSPF.
- Explain Spanning tree routing.
- What is Flooding?
- Explain the Mobile-IP./ write short notes on mobile IP.
- Explain and compare distance vector routing and link state routing algorithm.
- Explain the leaky bucket algorithm.
- Explain token bucket algorithm.
- Explain the congestion control in datagram subnets. Write about hop by hop choke packets scheme.
- Explain load shedding and jitter control strategies to handle the congestion.
- Explain the term jitter.
- Explain IP addressing scheme in detail.
- Compare the IPv4 and IPv6 Header.
- Explain the following concept:1) Tunneling 2) Network Address Translation 3)DHCP
- Write a note on ICMP.
This blog is very useful for all the Computer science engineering students especially for GTU Students.It contains Important questions for Exams, Programs code with output and explaination. Various E-books are also available for all those people who are love learning new and efficient language such as Python, .Net,etc. It is very useful for last minuters, last year GTU Question paper is also available.
QUESTION BANK FOR COMPUTER NETWORKS (2140709)
Program to demonstrate Hybrid Inheritance.
Program:
#include<iostream.h>
#include<conio.h>
class student
{
int r_no;
public:
void get(int a)
{
r_no=a;
}
void put()
{
cout<<"Rollnumber : "<<r_no<<endl;
}
};
class test : virtual public student
{
protected :
float s1,s2;
public:
void getmarks(float x,float y)
{
s1=x;
s2=y;
}
void putmarks()
{
cout<<" Marks in Academics "<<endl;
cout<<" Marks in subject 1 : "<<s1<<endl;
cout<<" Marks in subject 2 : "<<s2<<endl;
}
};
class sports :virtual public student
{
protected :
float score;
public:
void getscore(float s)
{
score=s;
}
void putscore()
{
cout<<"Sports score is : "<<score<<endl;
}
};
class result : public test, public sports
{
float total;
public:
void display()
{
total= ((s1+s2+score)/3);
put();
putmarks();
putscore();
cout<<"Result : " <<total <<endl;
}};
int main()
{
clrscr();
result r;
r.get(01);
r.getmarks(89,95);
r.getscore(100);
r.display();
getch();
return 0;
}
Write a program to demonstrate Hierarchical Inheritance.
Program :
#include<iostream.h>
#include<conio.h>
class m
{
public :
int m,n;
public :
void getmn(int x,int y)
{
m=x;
n=y;
}
};
class o : public m
{
public :
void add(void)
{
cout<<"M= "<<m<<endl;
cout<<"N= "<<n<<endl;
cout<<"M+N= "<<m+n<<endl;
}
};
class p : public m
{
public :
void mul()
{
cout<<"M= "<<m<<endl;
cout<<"N= "<<n<<endl;
cout<<"M*N= "<<m*n<<endl;
}
};
int main()
{
clrscr();
p ob;
o ob1;
ob1.getmn(10,20);
ob.getmn(30,20);
ob1.add();
ob.mul();
getch();
return 0;
}
Program :
#include<iostream.h>
#include<conio.h>
class m
{
public :
int m,n;
public :
void getmn(int x,int y)
{
m=x;
n=y;
}
};
class o : public m
{
public :
void add(void)
{
cout<<"M= "<<m<<endl;
cout<<"N= "<<n<<endl;
cout<<"M+N= "<<m+n<<endl;
}
};
class p : public m
{
public :
void mul()
{
cout<<"M= "<<m<<endl;
cout<<"N= "<<n<<endl;
cout<<"M*N= "<<m*n<<endl;
}
};
int main()
{
clrscr();
p ob;
o ob1;
ob1.getmn(10,20);
ob.getmn(30,20);
ob1.add();
ob.mul();
getch();
return 0;
}
INTER PROCESS COMMUNICATION PROBLEMS
Classical IPC Problems:
1. Dining Philosophers Problem
2. The Readers and Writers Problem
3. The Sleeping Barber Problem
1.
Dining
philosophers problems:
There are N philosphers sitting
around a circular table eating spaghetti and discussing philosphy. The problem
is that each philosopher needs 2 forks to eat, and there are only N forks, one
between each 2 philosophers. Design an algorithm that the philosophers can
follow that insures that none starves as long as each philosopher eventually
stops eating, and such that the maximum number of philosophers can eat at once.
· Philosophers
eat/think
· Eating needs 2 forks
· Pick one fork at a time
· How to prevent deadlock
The
problem was designed to illustrate the problem of avoiding deadlock, a system state in which no progress is
possible.
One
idea is to instruct each philosopher to behave as follows:
· think
until the left fork is available; when it is, pick it up
· think until the right fork is available; when
it is, pick it up
· eat
· put the left fork down
· put the right fork down
· repeat from the start.
This solution is
incorrect: it allows the system to reach deadlock. Suppose that all five
philosophers take their left forks simultaneously. None will be able to take their
right forks, and there will be a deadlock.
We could modify the
program so that after taking the left fork, the program checks to see if the
right fork is available. If it is not, the philosopher puts down the left one,
waits for some time, and then repeats the whole process. This proposal too,
fails, although for a different reason. With a little bit of bad luck, all the
philosophers could start the algorithm simultaneously, picking up their left
forks, seeing that their right forks were not available, putting down their
left forks, waiting, picking up their left forks again simultaneously, and so
on, forever. A situation like this, in which all the programs continue to run indefinitely
but fail to make any progress is called starvation.
The solution presented
below is deadlock-free and allows the maximum parallelism for an arbitrary
number of philosophers. It uses an array, state, to keep track of whether a
philosopher is eating, thinking, or hungry (trying to acquire forks). A
philosopher may move into eating state only if neither neighbor is eating.
Philosopher i's neighbors are defined by the macros LEFT and RIGHT. In other
words, if i is 2, LEFT is 1 and RIGHT is 3.
Solution:
#define N 5 /* number of philosophers */
#define LEFT (i+N-1)%N /* number of i's left neighbor */
#define RIGHT (i+1)%N /* number of i's right neighbor */
#define THINKING 0 /* philosopher is thinking */
#define HUNGRY 1 /* philosopher is trying to get
forks */
#define
EATING 2 /* philosopher is eating */
typedef int semaphore; /* semaphores are a special kind
of int */
int state[N]; /* array to keep track of
everyone's state */
semaphore
mutex =1; /* mutual
exclusion for critical regions */
semaphore
s[N]; /* one semaphore
per philosopher */
void philosopher(int i) /* i: philosopher number, from 0 to
N1 */
{
while (TRUE)
{ /* repeat forever */
think(); /* philosopher is thinking */
take_forks(i); /* acquire two forks or block */
eat(); /* yum-yum, spaghetti
*/
put_forks(i); /* put both forks back on table
*/
}
}
void
take_forks(int i) /* i:
philosopher number, from 0 to N1 */
{
down(&mutex); /* enter critical region
*/
state[i]
= HUNGRY; /* record fact that
philosopher i is hungry */
test(i); /* try to acquire 2 forks
*/
up(&mutex); /* exit critical region
*/
down(&s[i]); /* block if forks were not
acquired */
}
void
put_forks(i) /* i:
philosopher number, from 0 to N1 */
{
down(&mutex); /* enter critical region
*/
state[i]
= THINKING; /* philosopher has
finished eating */
test(LEFT); /* see if left neighbor can
now eat */
test(RIGHT); /* see if right neighbor can
now eat */
up(&mutex); /* exit critical region */
}
void
test(i) /* i: philosopher number,
from 0 to N1* /
{
if
(state[i] == HUNGRY && state[LEFT] != EATING && state[RIGHT] !=
EATING)
{
state[i]
= EATING;
up(&s[i]);
}
}
Readers Writer problems:
The
dining philosopher’s problem is useful for modeling processes that are
competing for exclusive access to a limited number of resources, such as I/O
devices. Another famous problem is the readers and writers problem which models
access to a database (Courtois et al., 1971). Imagine, for example, an airline
reservation system, with many competing processes wishing to read and write it.
It is acceptable to have multiple processes reading the database at the same
time, but if one process is updating (writing) the database, no other process
may have access to the database, not even a reader. The question is how do you
program the readers and the writers?
One
solution is shown below.
Solution to Readers Writer problems
typedef
int semaphore; /* use
your imagination */
semaphore
mutex = 1; /* controls
access to 'rc' */
semaphore
db = 1; /* controls
access to the database */
int
rc = 0; /* #
of processes reading or wanting to */
void
reader(void)
{
while
(TRUE)
{ /* repeat forever */
down(&mutex); /* get exclusive access to 'rc'
*/
rc
= rc + 1; /* one reader
more now */
if (rc == 1) down(&db); /* if this is the first reader ...
*/
up(&mutex); /* release exclusive access
to 'rc' */
read_data_base(); /* access the data */
down(&mutex); /* get exclusive access to 'rc'
*/
rc = rc
1; /* one reader
fewer now */
if (rc == 0) up(&db); /* if this is the last reader ...
*/
up(&mutex); /* release exclusive access to
'rc' */
use_data_read(); /* noncritical region */
}
}
void
writer(void)
{
while (TRUE)
{ /* repeat forever */
think_up_data(); /* noncritical region */
down(&db); /* get exclusive access
*/
write_data_base(); /* update the data */
up(&db); /* release exclusive
access */
}
}
In
this solution, the first reader to get access to the data base does a down on
the semaphore db. Subsequent readers merely have to increment a counter, rc. As
readers leave, they decrement the counter and the last one out does an up on
the semaphore, allowing a blocked writer, if there is one, to get in.
GTU IMPORTANT QUESTIONS
Question Bank
Subject: Digital
Electronics Semester: 3rd
1.
Describe hexadecimal
number system. Explain conversion between decimal number system and
hexadecimal number
system.
2.
Sums of conversion
from one number system to other number system(Especially pay more attention to floating point
numbers) and other sums.
3.
Explain 1’s and 2’s
complements with suitable examples. Show the subtraction using complements.
4.
Explain excess-3 code.
Show addition in Excess-3 code with suitable examples.
5. Explain BCD codes with suitable example. Show addition
in BCD code
(Add (275 + 496) in BCD).
6. What is Gray code?
What are its applications?
7. Explain in brief ASCII code, Weighted binary code,
EBCDIC code ?
8. Explain following terms or Explain
important parameters of Digital IC ?
9. Explain NAND and NOR as a Universal gate?
10. Explain Saturated and Non-Saturated Logic ? Give names of
Saturated and Non-Saturated Logic families?
11. Explain Positive and Negative logic system?
12.Draw symbol, truth table, and write Boolean expression for
all the gates?
13. Discuss characteristics of TTL family.
14. Draw and explain working of TTL NAND Gate
Circuit? What is the main advantage of TTL TOTEM Pole Output?
15. Explain CMOS NAND gate?
16.State and Prove Demorgan’s Law.
17. State Properties of Boolean Algebra.
18. Draw logic circuit from given Boolean Expression and vice
versa?
19. Sums of Karnaugh Map ( especially 4 variable K-map ) ( SOP
and POS both)
20. Sums of Simplification of Boolean Expression, Prove the
given Boolean expression, Find SOP and POS, Canonical SOP and POS for given
function.
21.Compare Half Adder and Full Adder.
22.Design Half Adder circuit using NOR gates only.
23. Explain Full Adder and draw logic circuit for full adder
using only NAND gates?
24. Explain Full Subtractor and draw logic circuit for full
subtractor using A-O-I gates?
25. What is parity? Explain parity checker/generator and state
its application?
26.Explain BCD Adder?
27. Explain circuit diagram of parallel binary adder.
28. Draw and explain circuit diagram of 4-bit Binary Parallel
Adder/Subtractor.
29. Draw and explain binary to gray code convertor and gray to
binary code convertor?
30.Explain multiplexer and its state its applications. Show the
difference between multiplexer and decoder.
31.Explain 4 to 16 line decoder? Draw its circuit using NAND gates.
32.Write short note on BCD to seven segment decoder.
33.Difference between Combinational and Sequential
circuits?
34. Write short notes on following
35. Explain J-K master slave flip flop with logic diagram.
36. Explain the terms Asynchronous and Synchronous?
37.Conversion of one flip flop in to another flip flop.
38.Explain the positive and Negative edge triggering and
Level Triggering.
39. Draw circuit diagram of serial input serial output shift
register. Draw waveforms to shift 1010 in to the register.
40. What is shift register? What are the applications of shift
register? Explain 4 bit parallel in parallel out shift register.
41. Explain serial in parallel out shift register with neat
diagram.
42.Explain the universal shift register.
43.Classify the different types of memory.
44.What is advantage of EEPROM over EPROM? Explain EPROM and state its applications.
45. Give difference between RAM and ROM.
GTU IMPORTANT QUESTIONS
ENGINEERING PHYSICS(2110011)
Q-1
|
Explain the characteristics of musical sound.
|
Q-2.
|
Discuss various factors affecting acoustics of building & give their remedies.
|
Q-3.
|
Discuss the principle & method of producing ultrasonic waves by magnetostriction method.
|
Q-4.
|
Discuss the principle & method of producing ultrasonic waves by piezoelectric method.
|
Q-5.
|
Explain the acoustics grating method of determining the velocity of ultrasonic waves in liquids.
|
Q-6.
|
Describe the construction & working of Nd: YAG laser with a suitable energy level diagram.
|
Q-7.
|
Difference between stimulated emission & spontaneous emission
|
Q-8
|
What do you mean by acceptance angle & numerical aperture? Derive expression for them.
|
Q-9
|
List out the difference between single mode fibre & multimode fibre.
|
Q-10
|
Explain the mode of propagation of optical fiber & index profile.
|
Q-11
|
Explain meissner effect & prove that χ = -1 for superconductors.
|
Q-12.
|
Difference between type-I & type-II superconductors
|
Q-13
|
Explain any one high temperature superconducting oxide.
|
Q-14
|
Explain melt spinning technique to prepare metallic glasses.
|
Q-15.
|
Explain functional properties (i) shape memory effect (ii) superelasticity.
|
Q-16.
|
Explain (1) The pulse echo system and (2) ultrasonic flaw detector with advantages & limitations.
|
Q-17
|
What is nanoparticle? Explain size dependence effect in nanomaterial
|
Q-18.
|
Discuss in detail (1) the quantum confinement (2) surface to volume ratio
|
Q-19
|
Explain the synthesis method of nano-material (1) Ball Milling (2) Sol-gel
Explain the properties, application and types of carbon nanotube
|
Q-20
|
What is Noise pollution? Explain how to control noise in machine.
|
Q-21
|
Discuss briefly about sound absorbing materials.
|
Q-22
|
The primary advantages of fibre-optics communication compared to metallic cable communication.
|
Q-23
|
Explain soft & hard magnetic materials.
|
Q-24
|
Explain hysteresis B - H curve
|
Q-25
|
Explain general properties of ferromagnetic materials & paramagnetic materials.
|
Q-26
|
Explain ferrites.
|
Q-27
|
Derive Clausius – mossotti Equation
|
Q-28
|
Explain types of Dielectric material
|
Q-30
|
Explain Electrical polarisation mechanism.
|
Subscribe to:
Posts (Atom)
How to crack Aptitude Question In GATE and many Competitive Examination
As you know the aptitude in the competitive examination is quite for more challenging to clear it. But believe me it is the easy stuff t...
-
Important questions for MPI 1. Draw the function block diagram of IC 8085 and its working. 2. Explain the addressing mode of 8085 wit...
-
ENGINEERING PHYSICS(2110011) Q-1 Explain the characteristics of musical sound. Q-2. Discuss various factors affecti...
-
Client Side Code : package serverclient1; import java.util.*; import java.io.*; import java.net.*; public class ClientCalci { p...