0% found this document useful (0 votes)
27 views2 pages

AOS

The document contains a series of questions related to operating systems, specifically focusing on processes, system calls, file handling, and inter-process communication. It includes theoretical questions, programming tasks, and explanations of various concepts such as process states, buffer allocation, and pipes. Additionally, it asks for code examples demonstrating specific behaviors and scenarios in C programming.

Uploaded by

sandipganage88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

AOS

The document contains a series of questions related to operating systems, specifically focusing on processes, system calls, file handling, and inter-process communication. It includes theoretical questions, programming tasks, and explanations of various concepts such as process states, buffer allocation, and pipes. Additionally, it asks for code examples demonstrating specific behaviors and scenarios in C programming.

Uploaded by

sandipganage88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

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]

You might also like