Decoder: A decoder is a combinational circuit that converts binary information from the n coded inputs to a maximum of 2n unique outputs. If the n-bit coded information has unused bit combinations, the decoder may have less than 2n outputs.
Sunday, 30 November 2014
Friday, 28 November 2014
CAO [ No answer ]
Q. A microprocessor has a data bus with 64 lines and an address bus with 32 lines. The maximum number of bits that can be stored in this memory is
a) 32 x 232
b) 32 x 264
c) 64 x 232
d) 64 x 264
a) 32 x 232
b) 32 x 264
c) 64 x 232
d) 64 x 264
CAO [No answer]
Q. Using an additional NOT gate, a JK flip-flop can be converted into
a) T flip-flop
b) RS flip-flop
c) Master Slave flip-flop
d) D flip-flop
a) T flip-flop
b) RS flip-flop
c) Master Slave flip-flop
d) D flip-flop
CAO
Q. The largest integer that can be represented in signed-2’s complement representation using n bits is
a) 2n-1
b) 2n
c) 2n-1 - 1
d) 2n - 1
Ans: c) 2n-1 - 1
a) 2n-1
b) 2n
c) 2n-1 - 1
d) 2n - 1
Ans: c) 2n-1 - 1
CAO
Q. ‘Cycle Stealing’ is associated with
a) Data transfer among registers
b) DMA
c) Pipelining
d) Microprogramming
Ans: b) DMA
Explaination:
a) Data transfer among registers
b) DMA
c) Pipelining
d) Microprogramming
[DOEACC January, 2006]
Ans: b) DMA
Explaination:
Cycle stealing allows the DMA controller to transfer one data word at a time, after which it must return control of the buses to the CPU. The CPU merely delays its operation for one memory cycle to allow the direct memory I/O transfer to "steal" one memory cycle.
Sunday, 23 November 2014
Operating system Sample Question
1. Does a process incur more execution overhead compared to a thread? Justify your answer.
[4]
[4]
[4]
[4]
[4]
6. What is the difference between a long-term scheduler and a short-term scheduler?
[4]
7. How can a single copy of a text editor be used to serve multiple users in a time-sharing system?
[4]
8. What is TLB? Find out the effective memory-access time with an 80% hit ratio and the following access times:
TLB access time: 20ns;
MM access time: 100ns
[8]
9. Describe the public-key encryption scheme and mention how is it advantageous to the data-encryption standard.
[10]
10. Consider the following page reference during a given time interval for a memory consisting of 5 frames: y,c,z,c,d,a,y,a,e,a,y,f,d,e. Using the i) FIFO replacement strategy and ii) the LRU replacement strategy compare the results. Repeat both FIFO and LRU replacement strategies for memory with 3 frames and same page reference pattern. Comment on the findings and draw a conclusion justifying the adoption of a particular replacement strategy.
[18]
11. What does ‘init’ do? What happens to the parent process id of a child when the parent terminates before its child? When does a child become ‘zombie’?
[8]
12. With reference to Unix when do the following situations occur?
i) Single process table entry contains pointers to the same file table entry.
ii) Different file table entries point to the same i-node table entry.
iii) Shell ‘forks’ a copy of itself and ‘waits’ for the child to terminate.
i) Single process table entry contains pointers to the same file table entry.
ii) Different file table entries point to the same i-node table entry.
iii) Shell ‘forks’ a copy of itself and ‘waits’ for the child to terminate.
[6]
13. How does CPU time-slice affect the Round-Robin algorithm?
[4]
14. Show and explain an implementation of the classical producer-consumer (producer produces an item, keeps it in a buffer from where the consumer is picking it up) problem using semaphore.
[10]
15. What is dynamic loading? Mention its advantage. How is dynamic linking performed? Mention any disadvantage that you can think of for both the schemes.
[8]
16. What is meant by a domain and the rights on it? Describe a Capability list and ways of protecting it from user tampering.
[9]
17. Rewrite the following code introducing code parallelism wherever applicable:
For i = 1 to k
a(i) = b(i) + c(i)
For j = 1 to k
d(j) = x(j) – y(j)
For p = 1 to k
x(p) = y(p) + b(p)
read(m,n,o,r)
q = m*n + r/o
write(q)
For i = 1 to k
a(i) = b(i) + c(i)
For j = 1 to k
d(j) = x(j) – y(j)
For p = 1 to k
x(p) = y(p) + b(p)
read(m,n,o,r)
q = m*n + r/o
write(q)
[4]
18. Using preemptive SJF(shortest-job-first) algorithm draw the Gannt chart and calculate the average waiting time for the following processes:
PROCESS | Arrival time | Burst time |
P0 | 0 | 6 |
P1 | 2 | 4 |
P2 | 3 | 10 |
P3 | 7 | 9 |
[5]
19. Where and how “bit vector/table” is used? What are the advantages and disadvantages of the technique?
[5]
20. What is deadlock? How can deadlock be prevented by not allowing “Hold and Wait” ? Is it a feasible policy?
[5]
21. How can synchronization be achieved when two processes communicate by message passing?
[5]
22. Provide a programming example of multithreading giving improved performance over a single-threaded solution.
[3]
Tuesday, 4 November 2014
Write a program to print "Hello Word".
#include<iostream>
using namespace std;
main()
{
cout<<"Hello world";
}
using namespace std;
main()
{
cout<<"Hello world";
}
Write a ‘C’ program to Read an array of 20 elements and then send all negative elements of the array to the end without altering the original sequence.
#include<stdio.h>
void del_pos(int a[],int n,int p)
{
int i;
for(i=p;i<n-1;i++)
{
a[i]=a[i+1];
}
}
main()
{
int a[100],i,j,n,ele,temp;
printf("\nEnter how many terms=");
scanf("%d",&n);
printf("\nEnter the elements=");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
printf("\nThe elements are=");
for(i=0;i<n && a[i]>=0;i++)
{
printf("%d ",a[i]);
}
printf("\nAfter sending negative elements to the end");
i=0;
while(a[i]<0)
{
if(a[i]<0)
{
temp=a[i];
del_pos(a,n,i);
a[n-1]=temp;
}
if(a[i]<0)
continue;
i++;
}
printf("\n");
for(j=0;j<n;j++)
{
printf("%d ",a[j]);
}
}
Subscribe to:
Posts (Atom)