Total Pageviews

Wednesday, January 6, 2021

Process synchronisation:

Operating System Question Set 
GALVIN


 1. code of producer consumer process.

2. race condition, critical section , starvation.
3. Peterson's solution.
4. semaphore - counting semaphore, binary semaphore.
5. spinlock.
6. bounded buffer problem.
7. Reader writer problem.
8. Dining philosopher problem.
9.  Producer consumer process using semaphore.
10. Monitor.
11. Bounded buffer problem using semaphore.
12. Dining philosopher problem using semaphore.
13.  Reader writer problem using semaphore.

Memory management.

 Operating System Question Set 

GALVIN


1. Address binding.

2. Base register and limit register.
3. memory protection.
4. Compile time, load time, execution time.
5. logical address, physical address.
6. dynamic loading.
7.  static linking and dynamic lining.
8. Swapping.
9. First fit, best fit, worst fit.
10. internal fragmentation, external fragmentation, 50-percent rule.
11. Paging, TLB.
12. Re-entrant code.
13. Hierarchical paging.
14. inverted page table
15. segmentation,  segmentation with paging .
16. virtual memory, demand paging.
17. Page replacement technique.
18. thrashing.
19. Working set model.
20. Buddy system.

PROCESS:

 Operating System Question Set 

GALVIN


1. What is Process?

2. Describe the structure of process in memory.
3. Show the diagram of process state.
4. What is Process Control Block?
5. Define CPU scheduling.
6. What are the various process scheduling concepts?
7. What is preemptive and non preemptive scheduling?
8. What is a Dispatcher?
9. What is dispatch latency?
10. What are the various scheduling criteria for CPU scheduling?
11. Define throughput.
12. What is turnaround time?
13.What is the objective of process scheduler?
14. Define job queue,ready queue.
15, Draw he queuing diagram of process.
16. Explain the term scheduler,short term scheduler,medium term scheduler,long term scheduler.
17. What do you mean by degree of multi programming?How it is related to scheduler?
18. What do you mean by I/O bound process and CPU bound process?
19. convoy effect, aging.

THREAD:

 Operating System Question Set 

GALVIN


1. definition.

2. single threaded and multi-threaded process.
3. synchronisation of thread.


INTRODUCTION:

 Operating System Question Set 

GALVIN


1. Differentiate between tightly coupled systems and loosely coupled systems.

2. Define OS

3. What are the differences between Batch OS and Multiprogramming?
4. What are the differences between Multitasking and Multiprogramming?
5. What is Clustered System?
6. What is Real Time System? List out their types.
7. What is the kernel?
8. What are the three main purposes of an operating system?
9. What are batch systems?
10. What do you mean by system calls?
11. Explain the various types of computer systems.
12. Explain how protection is provided for the hardware resources by the operating system.
13. What are the system components of an operating system and explain them?
14. What is mainframe computer?
15. What is workstations?
16. What is server?
17. What is bootstrap program?
18. What is firmware?
19. What is  symmetric multiprocessing (SMP) and asymmetric multiprocessing?
20. What is hot-standby mode?
21. What is response time
22. What is interactive (or hands-on) computer system
23. What is Time sharing (or multitasking)
24. What is Real-Time Embedded Systems
25. What is Handheld systems
26. What is Client-Server Computing
27. What is peer-to-peer (P2P) system

Tuesday, December 29, 2020

8085 Microprocessor sample question set Gaonkar Chapter 10

 Gaonkar Chapter  10


1. Packed BCD and unpacked BCD

2. BCD to binary,binary to BCD

3. Binary to ASCII and ASCII to bianry.

4. BCD addition and BCD subraction.

5. DAA simulation.

8085 Microprocessor sample question set Gaonkar Chapter 9

 Gaonkar Chapter  9


1. What is stack?

2. What is subroutine?

3. How PUSH and POP instructions are executed?show the steps.

4. Timing diagram of PUSH, POP.

5. What is subroutine?

6. How CALL and RET instructions are executed?show the steps.

7. Timing diagram of CALL, RET.

8. How parameters are passed in subroutine?

9. Restart insrucions.

10. Conditional call.

11. Nesting of subroutine.

12. comparison of instruction  CALL,PUSH,POP,RET.


8085 Microprocessor sample question set Gaonkar Chapter 8

 Gaonkar Chapter  8


1. what is time delay?

2. Delay using single register

3. Delay usng register pair

4. Delay using loop within loop

5. Design a 1 second delay

8085 Microprocessor sample question set Gaonkar Chapter 7

 Gaonkar Chapter  7


1. Continuous loop, Conditional loop

2. Counter and indexing

3. 16 bit operaion of MP

4. Block transfer

8085 Microprocessor sample question set Gaonkar Chapter 6

 Gaonkar Chapter  6


1. NOP operation uses

2. Addressing mode of instruction

3. Conditional jump, Unconditional jump

4. Static debugging, Dynamic debugging


8085 Microprocessor sample question set Gaonkar Chapter 5

 Gaonkar Chapter  5


1. IN and OUT instruction timing diagaram

2. Chip selection

8085 Microprocessor sample question set Gaonkar Chapter 4

 Gaonkar Chapter  4


1. Multiplexed Address Bus

2. Use of ALE

3. Control and status signal

4. How clock is generated in MP?

5. Demultiplexing the AD bus diagram

6. Timing diagram of differen machine cycle

7. IR regesiter function

8. Register arrays

9. Memory interfacing

10. Absolute decoding, Partial decoding


8085 Microprocessor sample question set Gaonkar Chapter 3

 Gaonkar Chapter  3


1. Instruction cycle

2. Fetch,decode,execute cycle

3. Machine cycle

4. T-states

5. Data bus, Address Bus, Control Bus

6. Unidirectional bus, Bidirectional bus

7. Memory map and address

8. Memory mapped i/o,i/o mapped i/o or isolated i/o ( comparison)

9. Buffer, tristate buffer, bidirectional buffer

10. Priority encoder


8085 Microprocessor sample question set Gaonkar Chapter 2

 Gaonkar Chapter  2


1. Different registers

2. Flag registers

3. PC and SP

4. Word size of microprocessor

5. Opcode format

6. One byte ,two byte, three byte instruction

7. How does microprocessor differentiate data and instruction code?


8085 Microprocessor sample question set Gaonkar Chapter 1

 8085 Microprocessor sample question set

Gaonkar Chapter 1


1. How does the microprocessor works?

2. Instruction set.

3. Microcontroller defination,difference with microprocessor.

4. Monitor program

Tuesday, December 15, 2020

18. WAP to display Fibonacci series (i)using recursion, (ii) using iteration

 18. WAP to display Fibonacci series 

(i)using recursion, 

(ii) using iteration




19. WAP to calculate Factorial of a number (i)using recursion, (ii) using iteration

 19. WAP to calculate Factorial of a number (i)using recursion, (ii) using iteration





20. WAP to calculate GCD of two numbers (i) with recursion (ii) without recursion.

 20. WAP to calculate GCD of two numbers (i) with recursion (ii) without recursion.





17. Given two ordered arrays of integers, write a program to merge the two-arrays to get an ordered array.

 17. Given two ordered arrays of integers, write a program to merge the two-arrays to get an ordered array.




16. Write a menu driven program to perform following operations on strings: a) Show address of each character in string b) Concatenate two strings without using strcat function. c) Concatenate two strings using strcat function. d) Compare two strings e) Calculate length of the string (use pointers) f) Convert all lowercase characters to uppercase g) Convert all uppercase characters to lowercase h) Calculate number of vowels i) Reverse the string

 16. Write a menu driven program to perform following operations on strings: 

a) Show address of each character in string 

b) Concatenate two strings without using strcat function. 

c) Concatenate two strings using strcat function. 

d) Compare two strings 

e) Calculate length of the string (use pointers) 

f) Convert all lowercase characters to uppercase 

g) Convert all uppercase characters to lowercase 

h) Calculate number of vowels 

i) Reverse the string

15. Write a program to find sum of n elements entered by the user. To write this program, allocate memory dynamically using malloc() / calloc() functions or new operator.

 15. Write a program to find sum of n elements entered by the user. To write this program, allocate memory dynamically using malloc() / calloc() functions or new operator.




13. Write a program in which a function is passed address of two variables and then alter its contents.

 13. Write a program in which a function is passed address of two variables and then alter its contents.



14. Write a program which takes the radius of a circle as input from the user, passes it to another function that computes the area and the circumference of the circle and displays the value of area and circumference from the main() function.

 14. Write a program which takes the radius of a circle as input from the user, passes it to another function that computes the area and the circumference of the circle and displays the value of area and circumference from the main() function.





11. WAP that prints a table indicating the number of occurrences of each alphabet in the text entered as command line arguments.

 11. WAP that prints a table indicating the number of occurrences of each alphabet in the text entered as command line arguments.

how to execute from command line







c++ code :



12. Write a program that swaps two numbers using pointers.

 12. Write a program that swaps two numbers using pointers.



10. WAP to perform following actions on an array entered by the user: i.Print the even-valued elements ii.Print the odd-valued elements iii.Calculate and print the sum and average of the elements of array iv.Print the maximum and minimum element of array v.Remove the duplicates from the array vi.Print the array in reverse order The program should present a menu to the user and ask for one of the options. The menu should also include options to re-enter array and to quit the program.

 10. WAP to perform following actions on an array entered by the user:

 i.Print the even-valued elements 

ii.Print the odd-valued elements 

iii.Calculate and print the sum and average of the elements of array 

iv.Print the maximum and minimum element of array 

v.Remove the duplicates from the array 

vi.Print the array in reverse order 

The program should present a menu to the user and ask for one of the options. The menu should also include options to re-enter array and to quit the program.




Sunday, December 6, 2020

CMS-A-CC-5-11-P: Relational Database Management System

 CMS-A-CC-5-11-P: Relational Database Management System

Core Course- 11, Practical, Credit:02, Contact hours: 40 hours.

RDBMS Lab using My SQL & PHP

11WAP to calculate factorial and to compute the factors of a given no. (i)using recursion, (ii) using iteration



11. WAP to calculate factorial and to compute the factors of a given no. (i)using recursion, (ii) using iteration

#include<iostream>

using namespace std;


class cl

{

private:

int no,fl;

public:

void input()

{

fl=1;

cout<<"\nEnter the no: ";

cin>>no;

}

void factorial()

{


if(no==0)

{

cout<<"\n"<<no<<"!= "<<1;

}

else

{

for(int i=no;i>=1;i--)

{

fl=fl*i;

}

cout<<"\n"<<no<<"!= "<<fl;

}

}

int factorial(int n)

{

if(n > 1)

return n * factorial(n - 1);

else

return 1;

}

void factor()

{

cout<<"\nFactors of "<<no<<"= ";

if(no==1)

{

cout<<1;

}

for(int i=2;i<=no;i++)

{

if(no % i ==0)

{

cout<<" "<<i;


}

}

}

void factor(int n,int i)

{

if(n==1)

cout<<"1";

else

{

if(i <= n)

{

if(n%i == 0)

{

cout << i << " ";

}

factor(n,i+1);

}

}

}

};

int main()

{

cl ob;

int ch,n,x;


do

{

    cout<<"\n1.FACTORIAL using Iteration \n2.FACTORIAL using Recursion \n3.Compute FACTORS using Iteration \n4.Compute FACTORS using Recursion \n5.Exit";

cout<<"\nEnter ur Choice: ";

cin>>ch;

switch(ch)

{

case 1:


ob.input();

ob.factorial();

break;


case 2:

cout<<"\nEnter the no: ";

cin>>n;

x=ob.factorial(n);

cout<<"\n"<<n<<"!= "<<x;

break;


case 3:

ob.input();

ob.factor();

break;


case 4:

cout<<"\nEnter the no: ";

cin>>n;

cout<<"\nFactors of "<<n<<"= ";

ob.factor(n,2);

break;


case 5:

cout<<"\nEXIT";

break;


default:

cout<<"\nSorry! Invalid Choice";

}

}

while(ch!=5);


return 0;

}


10

 CMSACOR05P: Data Structures Lab


10. WAP to scan a polynomial using linked list and add two polynomial.


PROGRAME :  WAP to scan a polynomial using linked list and add two polynomial…

 

 

PROGRAME CODE

#include<stdio.h>

#include<iostream>

using namespace std;

class node{

                public:

                                int degree;

                                int data;

                                node* link1;

                                node(){

                                                degree=0;

                                                data=0;

                                                link1=NULL;

                                }

};

class poly{

                public:

                                node* head;

                                poly(){

                                                head=NULL;

                                }

                                int check(int k){

                                                node* ptr=head;

                                                while(ptr!=NULL){

                                                                if(ptr->degree==k)

                                                                                return 1;

                                                                ptr=ptr->link1;

                                                }

                                                return 0;

                                }

                                void append(node* n){

                                                if(head==NULL)

                                                                head=n;

                                                else{

                                                                if(check(n->degree))

                                                                cout<<"THE DGREE IS ALREADY EXIST TRY WITH ANOTHER ....."<<endl;

                                                                else{

                                                                                node* ptr=head;

                                                                                while(ptr!=NULL){

                                                                                                if(ptr->link1==NULL){

                                                                                                                ptr->link1=n;

                                                                                                                break;

                                                                                                }

                                                                                                ptr=ptr->link1;

                                                                                }

                                                                }

                                                }

                                }

                                poly operator +(poly ob1){

                                                node* ptr=head;

                                                node* ptr1=head;

                                                node* ptr3=NULL;

                                                node* ptr4=head;

                                                node* ptr5=head;

                                                node* ptr6=head;

                                                cout<<"ADDITION SUCCESSFULL "<<endl;

                                                while(ptr1->link1!=NULL)

                                                                ptr1=ptr1->link1;

                                                ptr1->link1=ob1.head;

                                                for(ptr=head;ptr!=NULL;ptr=ptr->link1){

                                                                ptr3=ptr->link1;

                                                                while(ptr3!=NULL){

                                                                                if(ptr3->degree==ptr->degree){

                                                                                                ptr->data=ptr->data+ptr3->data;

                                                                                }

                                                                                ptr3=ptr3->link1;

                                                                }

                                                }

                                               

                                                while(ptr4!=NULL){

                                                                ptr6=ptr4;

                                                                ptr5=ptr4->link1;

                                                                while(ptr5!=NULL){

                                                                                if(ptr4->degree==ptr5->degree)

                                                                                                ptr6->link1=ptr5->link1;

                                                                                ptr6=ptr5;

                                                                                ptr5=ptr5->link1;

                                                                }

                                                                ptr4=ptr4->link1;

                                                } 

                                }  

                                void display(){

                                                if(head==NULL)

                                                                cout<<".........EMPTY............"<<endl;

                                                else{

                                                                node* ptr=head;

                                                                while(ptr!=NULL){

                                                                                cout<<"("<<ptr->data<<" x^"<<ptr->degree<<")";

                                                                                if(ptr->link1!=NULL)

                                                                                                cout<<" + ";

                                                                                ptr=ptr->link1;

                                                                }

                                                                cout<<"= 0 ";

                                                }

                                }

};

int main(){

                int opt=0;

                poly ob;

                poly ob1;

                do{

                                cout<<"\nPRESS 0 TO EXIT...."<<endl;

                                cout<<"PRESS 1 TO APPEND NODE FOR 1st POLYNOMIAL..........."<<endl;

                                cout<<"PRESS 2 TO APPEND NODE FOR 2nd POLYNOMIAL..........."<<endl;

                                cout<<"PRESS 3 TO DISPLAY 1st POLYNOMIAL......"<<endl;

                                cout<<"PRESS 4 TO DISPLAY 2nd POLYNOMIAL......"<<endl;

                                cout<<"PRESS 5 TO ADD TWO POLYNOMIALS........"<<endl;

                                cout<<"PRESS 6 TO DISPLAY THE RESULT........"<<endl;  

                                cin>>opt;

                                node *n=new node();

                                switch(opt){

                                                case 0:

                                                                break;

                                                case 1:

                                                                cout<<"ENTER THE DEGREE....."<<endl;

                                                                cin>>n->degree;

                                                                cout<<"ENTER THE DATA......"<<endl;

                                                                cin>>n->data;

                                                                ob.append(n);

                                                                break;

                                                case 2:

                                                                cout<<"ENTER THE DEGREE....."<<endl;

                                                                cin>>n->degree;

                                                                cout<<"ENTER THE DATA......"<<endl;

                                                                cin>>n->data;

                                                                ob1.append(n);

                                                                break;

                                                case 3:

                                                                ob.display();

                                                                break;

                                                case 4:

                                                                ob1.display();

                                                                break;

                                                case 5:

                                                                ob+ob1;

                                                                break;

                                                case 6:

                                                                ob.display();

                                                                break;                                                  

                                                default:

                                                                cout<<".........ERROR........"<<endl;

                                                                break;

                                }

                }while(opt!=0);

                return 0;

}


8

 CMSACOR05P: Data Structures Lab

8. Perform Queues operations using Circular Array implementation. Use Templates.