System Call

Question 1
Which of the following standard C library functions will always invoke a system call when executed from a single-threaded process in a UNIX/Linux operating system?
[MSQ]
A
exit
B
malloc
C
sleep
D
strlen
GATE CSE 2021 SET-1   Operating System
Question 2
The following C program is executed on a Unix / Linux system:
#include < unistd.h >
  int main() {
    int i;
    for (i = 0; i < 10; i++)
      if (i % 2 == 0) fork();
    return 0;
  }
The total number of child process created is __________ .
A
31
B
63
C
5
D
6
GATE CSE 2019   Operating System
Question 3
The difference between a named pipe and a regular file in Unix is that
A
Unlike a regular file, named pipe is a special file
B
The data in a pipe is transient, unlike the content of a regular file
C
Pipes forbid random accessing, while regular files do allow this.
D
All of the above
ISRO CSE 2018   Operating System
Question 4
The following C program:
 {
    fork(); fork(); printf("yes");
    
}
If we execute this core segment, how many times the string yes will be printed?
A
Only once
B
2 times
C
4 times
D
8 times
ISRO CSE 2018   Operating System
Question 5
The Linux command
 mknod myfifo b 4 16
A
will create a character device if user is root
B
will create a named pipe FIFO if user is root
C
will create a block device if user is root
D
None of these
ISRO CSE 2017   Operating System
Question 6
Wha is the output of the following program?
 main()
{
    int a = 10;
    if(fork()) == 0))
        a++;
    printf("%d\n",a);  
}

A
10 and 11
B
10
C
11
D
11 and 11
ISRO CSE 2017   Operating System
Question 7
Consider the following program.
 main()
{
    fork();
    fork();
    fork();
}
How many new processes will be created?
A
8
B
6
C
7
D
5
ISRO CSE 2015   Operating System
Question 8
Identify the correct order in which a server process must invoke the function calls accept, bind, listen, and recv according to UNIx socket API.
A
listen, accept, bind, recv
B
bind, listen, accept, recv
C
bind, accept, listen, recv
D
accept, listen, bind, recv
GATE CSE 2015 SET-2   Operating System
Question 9
A process executes the code
fork();
fork();
fork();
The total number of child processes created is
A
3
B
4
C
7
D
8
GATE CSE 2012   Operating System
Question 10
Which of the following UNIX command allows scheduling a program to be executed at the specifies time?
A
cron
B
nice
C
date and time
D
schedule
ISRO CSE 2011   Operating System
There are 10 questions to complete.

3 thoughts on “System Call”

Leave a Comment

Like this FREE website? Please share it among all your friends and join the campaign of FREE Education to ALL.