A) true or false justify.
“the kernel is a separated of a set of process that run in parallel to user
process”.
B) What are the 4 different condition for the pid argument of kill system call?
C) What is the difference between ‘wait’ and ‘waitpid’.?
D) If we execute iseek(fd,0,2)then what will be the new file byte offset?
E) What is broken link?
F) How to open process ID and parent process ID?
G)What is the output of following code ?
#include<stdio.h>
Int main()
{
If (fork()&&(!fork))) {
If (fork () ||fork ()) {
Fork(); }
}
Printf(“2”);
Return 0;
}
Q2)Attempt the following
A) I)what is process? Draw and explain state transition diagramof a process[4]
Ii)explain any three data structure for demand pagiging. [3]
B) explain syntax of following system call. [5]
I) alarm()
II) Kill()
III) Sbrk()
IV) Exec()
V) Fehmod()
Q3) Attempt the following [12]
A) I)explain fourth scenario for buffer allocation. [4]
II)Explain the behaviour of the following program: [3]
#include<fentl.h>
Main(int argc,char*argv[])
{
Int fd,skval;
Char c;
If(argc!=2)
exit();
While(skval=read(fd,& c,!))
{
Printf(“char%c\n”,c)
Skval=Iseek(fd,1023L,1);
Printf(“new seek val%d\n” skval)
}
}
B) write a c program to prints the type of file for each command line argument [5]
Q4)Attempt the following [12]
A) I)what are pipes?explain named pipes and unnamed pipes? [4]
II) which operation are performed by the kernel during execution of fork()? [3]
B)write a c program to demonstarte racecondition in catching signals [5]
Q5)attempt the following [12]
A) I)under which circumstances the process is swapped out? [4]
II)explain the structure of regular file with suitable diagram? [3]
B) c program that creates a child process to read commands from the standard input and execute
them.you can assume that no arguments will be passed to the commands to be executed[5]
.
Q6) attempt the following [12]
A) I) under which circumstances the process is swapped out? [4]
II) draw and explain the structure of buffer pool? [3]
B) draw and explain unix system architecture [5]
Q7)attempt the following [12]
A) I)write a short note on process context. [4]
II)write c program that illustrate the suspending and resuming process using signal.[3]
B)what is anonymous mapping?what are the advantages of allocating memory via anonymous
memory mapping?. [5]