Unix System Calls

  Home  OS Unix  Unix System Calls


“Unix System Calls frequently Asked Questions in various Unix System Calls job Interviews by interviewer. The set of Unix System Calls interview questions here ensures that you offer a perfect answer to the interview questions posed to you. Get preparation of Unix System Calls job interview”



7 Unix System Calls Questions And Answers

3⟩ What is the difference between command and utility in Unix?

both the command and utility are give the same priority but

to give the diff between them we have only a major diff and

it is

utilites in unix will say how the commands are been

implimenting

command will come under the utilites

they are mainly 5 utilies in unix operating system and they

are

1.file processing utilites

2.disk processing utilites

3.process utilites

4.network utilites

5.text processing utilites

 146 views

4⟩ Explain the mount and unmount system calls?

mount is the command used to know which devices are

loaded.it means devices like floppy drive,cd drive.if we

give mount command it will display which device is mounted.

unmount is the command used to disable the device.if we

give umount and the path of the device then it will umount

the device.

In windows we wont have this concept.because those are

installed.

 147 views

5⟩ Explain What are the Unix system calls for I/O?

open(pathname,flag,mode) - open file

creat(pathname,mode) - create file

close(filedes) - close an open file

read(filedes,buffer,bytes) - read data from an open file

write(filedes,buffer,bytes) - write data to an open file

lseek(filedes,offset,from) - position an open file

dup(filedes) - duplicate an existing file descriptor

dup2(oldfd,newfd) - duplicate to a desired file descriptor

fcntl(filedes,cmd,arg) - change properties of an open file

ioctl(filedes,request,arg) - change the behaviour of an open

file

The difference between fcntl anf ioctl is that the former is

intended for any open file,

while the latter is for device-specific operations.

 135 views

6⟩ The very first process created by the Kernel in UNIX is?

When the kernel begins to run, it starts by setting up a

number of internal lists, or tables.After initializing its

tables, the kernel creates three dummy processes; sched,

vhand and bdflush (with process IDs 0, 2 and 3

respectively). Finally the kernel creates a third process

init which pid 1. init starts up as a dummy process, then

achieves independence and runs as the first true process on

the system.

 144 views