Unix, Operating system interview questions faqs
1)What is the difference between a shell variable that is exported and the one that is not e...
2)What are the possible return status of kill() command?
3)What are the benefits of creating links to a file?
4)What is wildcard?
5)Write a script to convert all dos style backslashes to unix style slashes in a list of fil...
6)How do you read arguments in a shell program - $1, $2 ?
7)What are the steps to take files from unix server to windows?
8)What is the method of setting an environment variable from a program?
9)How do you debug a core dump?
10)How to delete a word from a file using shell scripting???
11)What is the concept of named pipe?
12)How does fork() and vfork() differ?
13)What type of scheduling is used in Unix?
14)Explain the unix file system?
15)What is make used for? How is it different from a shell script?
16)How would you replace the n character in a file with some xyz?
17)What are the steps for locking a file?
18)What is a zombie?
19)What are the differences between Shared and Dynamic libraries?
20)Give examples of how memory leaks can occur with c programs?
21)How to compare floating point number in shell scripting ?
22)How do u open a read only file in Unix?
23)How would you create shared and dynamic libraries?
24)Write a shell script to identify the given string is palindrome or not?
25)What is the use of `du, utility?
26)You want to migrate a 32 bit application to a 64 bit os, what all would you check?
27)What is inter-process communication facility?
28)What is a file server?
29)Explain difference between IPC mechanisms?
30)How would you remove a semaphore / shared memory whose owner processes have died?
Showing posts with label unix interview faqs. Show all posts
Showing posts with label unix interview faqs. Show all posts
What Happens when you execute a program in unix
What Happens when you execute a program in unix?
Question :What Happens when you execute a program in unix ?Answer :When you execute a program on your UNIX system, the system creates a special environment for that program. This environment contains everything needed for the system to run the program as if no other program were running on the system. Each process has process context, which is everything that is unique about the state of the program you are currently running. Every time you execute a program the UNIX system does a fork, which performs a series of operations to create a process context and then execute your program in that context. The steps include the following: • Allocate a slot in the process table, a list of currently running programs kept by UNIX. • Assign a unique process identifier (PID) to the process. • iCopy the context of the parent, the process that requested the spawning of the new process. • Return the new PID to the parent process. This enables the parent process to examine or control the process directly. After the fork is complete, UNIX runs your program.
Keywords:
What happens when you execute a command in unix?
How do you execute a program in a command line?
What happens when you run a program?
How do you execute a program in a command line unix?
how to run c program in unix vi editor
unix commands
unix programming book
how to compile c program in unix
how to run a program in unix terminal
unix shell
bash shell scripting
unix programming language
What is an advantage of executing a process in background
What is an advantage of executing a process in background
Question :What is an advantage of executing a process in background?
Answer :The most common reason to put a process in the background is to allow you to do something else interactively without waiting for the process to complete. At the end of the command you add the special background symbol, &. This symbol tells your shell to execute the given command in the background. Example: cp *.* ../backup& (cp is for copy)
Keywords:
advantages and disadvantages of background process in linux
advantage of background process
background process in unix
a process that runs in the background without the need for user interaction is known as a
managing system services and background processes
processes in linux
interview questions on process management in linux
shell process in unix
How do you execute one program from within another in unix
How do you execute one program from within another in unix
Question :How do you execute one program from within anotherin unix?Answer :The system calls used for low-level process creation are execlp() and execvp(). The execlp call overlays the existing program with the new one , runs that and exits. The original program gets back control only when an error occurs. execlp(path,file_name,arguments..); //last argument must be NULL A variant of execlp called execvp is used when the number of arguments is not known in advance. execvp(path,argument_array); //argument array should be terminated by NULL
Keywords:
return value from one shell script to another
how to pass variable from one function to another in shell script
bash function call another function
calling functions in shell script
unix function with argument
bash function run command
write function in unix
factorial program in shell script using function
Subscribe to:
Posts (Atom)