Wednesday, May 26, 2010

Marks division in Lab Examination---------


Program/Preparation of experiment 20
Execution/ Conduct of experiment successfully 15
Viva Voce 15
_____
Total 50
_____

Friday, May 21, 2010

Correct procedure for last program

ie;- Program to demonstrate Exec family.
Note:- execute a user define program.


step 1: Write two programs 1) execdemo.c
2) add.c (ie: this could be any user program without exec system call,
source code of both the programs is given below)



// execdemo.c
#include<
#include< 

int main()
{

printf("Demonstration of EXECL system call by executing user program\n");
execl("./add","add",(char*)0);
printf("This will not be printed\n");
}


// add.c
#include<>

int main(int argc,char *argv[])
{
int a,b,c;
a=10;
b=20;
c=a+b;
printf("Addition of %d and %d is %d\n",a,b,c);
}




step 2: Compile first program with command ------- cc execdemo.c
Compile second program with command ------ cc -o add add.c ( here the object will go in "add" file)

step 3: execute as ------ ./a.out
Questions Related to Lab 


1) What is fork() system call?
2) What is the difference between "fork()" and "vfork()" system call?
3) What getpid() and getppid() returns?
4) Differences between different "exec" system calls?
5) Difference berween fork and Exec system call?
6) What is the function of wait() system call?
7) Difference between wait() and sleep() system call?
9) What is a process?
10) Difference between process and program?
11) What fork() system call returns to each process?
12) What is IPC?
13) Expand POSIX?
14) What is pipe?
15) What is a message Queue?
16) What is shared memory?
17) Among message queue and shared memory which is faster?
18) Among message queue and shared memory, requires seperate synchronization?
19) What is a server?
20) What is echo server?
21) Explain Working of Producer-consumer, reader-writers and dining philosophers?
22) Why file locking is done?









Questions Related to Theory


1) What is an Operating System?
2) What is a critical section?
3) what is mutual exclusion?
4) what is race condition?
5) What is deadlock?
6) What are the necessary conditions of deadlock?
7) What is a Semaphore and what are the operations on semaphores?
8) What at conditional variables?
9) Difference between conditional varialbles and semaphores?
10) Difference between process and Thread?
11) What is physical address and what is logical address and how are they different?
12) What is process switch and what is context switch and what happens when these happens?
13) What is page fault?
14) What is round robin scheduling?
 Producer Consumer Problem using Shared Memory and Semaphores.
 Program to demonstrate Exec family's system call.
   execl.


 Program to demonstrate pthread- create,sleep,join,exit.
 Program to demonstrate Exec family's system call.
  execv


 Readers-Writer problem using Semaphore.
 Program to demonstrate Exec family
 execlp.


 Dining Philosopher's problem using Semaphores.
 Program to demonstrate Exec family
 execvp


 Echo Server using Pipes.
 Program to show existence of an zombie process.

 Program to demonstrate file related system calls.
   Application:- Make copy of a file
   Program to show usage of signal  
   SIGFPE ii) SIGALRM

 Program to demonstrate file locking using system call.
  Program to show usage of signal  
  SIGNIT ii)SIGQUIT  

 Echo Server using Message Queues.
 Program to demonstrate usage of fork,wait, sleep,getpid, getppid.

 Print type of file for each command line argument.
 Program to show existence of an orphan process.

 Program to printing file attributes for specific descriptor.
  Program to demonstrate Exec family
 (note: execute a user define program)