System Programming Test
A C program "domath.c" utilizes the math library. Which of the following commands correctly creates the corresponding executable "domath"?
A process opens a file and forgets to close the file descriptor when it exits. What is the result?
By convention, which of the following signals causes a daemon to reload its configuration?
How do threads created using pthread library share data between themselves efficiently?
How do two threads synchronize access to shared data in a multi threaded application?
How does a programmer distinguish a child from its parent process following a fork system call?
How is the stack trace of all the threads in a multi threaded Linux application obtained?
How is the value of the shell environment variable IFS changed to comma (',')?
How many bytes of a file of size 1023 will be read by the following piece of code? char buf[256]; <snip> while (read(fd, buf, 256)) { /* Take some action */ } <snip>
If a process executes the following C code on a Linux system, what is the outcome? <snip> char *cp = 0, c = *cp; <snip>
If a process has locked a System V Semaphore and receives a SIGKILL signal, which of the following is true?
If a process is hung in the kernel context, sending it a SIGKILL will _____.
If a process is terminated due to a SEGFAULT on a Solaris 9 system, what is the name of the core file that is created?
If a write system call fails and if errno is set to EFAULT, what does it signify?
Ignoring the setup cost for each of the System V IPC mechanisms, which of the following is the most efficient?
On Linux, the pthread_create interface does not use the fork system call to create threads.
Shared libraries increase an application's disk size?
The library routine printf does not use any system calls.
Threads created via pthread_create need to first set up shared memory using shmop before they can share data.
What are the typical system calls the Unix shell invokes when it has to execute a new command?
What command is used to list the shared libraries used by an executable?
What does the '-pg' option of the Unix compiler do?
What does the "open" system call return to the caller?
What does the command "mknod temp p" do?
What does the following command do to the process with pid 12345? "kill -9 12345".
What does the open system call return upon success?
What is the default file descriptor used for the error outputs of a process?
What is the effect of a process executing an unlink system call while another process has opened the same file?
What is the effect of executing the following system call on the file "test.txt"? open("test.txt", O_TRUNC)
What is the effect of issuing a "$c" command at the adb prompt during a debugging session on a Solaris 9 system?
What is the effect of setting the "sticky" bit on an application's executable image?
What is the name of the standard linker on Unix?
What is the network byte order in Unix?
What is the outcome of attempting an ioctl system call on a block device file?
Where are the DNS and search domains specified?
Which library routine is used to translate the numeric system call error code to a human readable text error message?
Which of the compiler options generates an assembler output file?
Which of the following are true of Unix system calls?
Which of the following block sizes results in the best read/write performance for an IO intensive application?
Which of the following C headers needs to be included for socket programming?
Which of the following calls is used to initiate a socket connection to a target address?
Which of the following can be used to debug the process "123" and program "test" on a Linux system?
Which of the following can be used to inspect the system call arguments of a Linux process?
Which of the following commands can be used on a Linux system to configure a network interface (card)?
Which of the following commands can be used on a Linux system to kill process 8977 and all its children?
Which of the following commands can be used to compile a C file called "test.c" into an executable called "test"?
Which of the following commands can be used to create a static (archive) library?
Which of the following commands can be used to generate a listing of all the shared libraries that an executable needs?
Which of the following commands can be used to install the native software package SOFTpkg on a Solaris system?
Which of the following commands can be used to list all the active TCP connections on a Linux system?
Which of the following commands can be used to list all the active TCP connections only on a Linux system?
Which of the following commands generates a listing of the system calls being executed by a program on Solaris?
Which of the following compiler options links the standard math library to the executable?
Which of the following creates an IPC message channel?
Which of the following environment variables specifies the shared library search path?
Which of the following gcc compiler options turns on optimization?
Which of the following gcc options can be used to generate a position independent code on a Linux system?
Which of the following gdb commands can be used to obtain the stack trace of all the threads of a multi threaded program running on Linux?
Which of the following IO mechanisms allows greater performance to concurrent IO-intensive applications?
Which of the following IPC message operations is performed to setup communication between arbitrary processes?
Which of the following IPC shared memory sequences is correct?
Which of the following is employed by the operating system to speed up file IO on a Solaris system.
Which of the following is true of Unix system calls?
Which of the following ksh trap sequences causes the function 'handler' to be executed when the script exits?
Which of the following libraries provides the POSIX thread implementation on Solaris?
Which of the following Linux commands can be used to identify the processes consuming maximum resources (CPU, Memory)?
Which of the following methods can be used as a communication mechanism between two unrelated processes?
Which of the following methods can be used to allocate and use memory on a Unix system?
Which of the following options of the compiler is turned on to generate additional debug information (like the source code) for debugging an application?
Which of the following options specifies a non standard library path during linking?
Which of the following redirects the standard error output of a command to the log file "error.log"?
Which of the following segments within the process address space are unique to each thread?
Which of the following sequences creates a socket based connection for communication?
Which of the following sequences prints all the second column fields of an input file "values.txt"?
Which of the following shell commands is useful in single stepping through a shell script?
Which of the following shell operators is used to send the standard output of the first command to the standard input of the second command?
Which of the following shell operators redirects the standard input of the command being executed?
Which of the following shell parameters contains the return value of the previously executed shell command?
Which of the following signals are used by the Unix shell to implement job control?
Which of the following signals cannot be ignored by a process?
Which of the following socket system calls creates a Unix Domain Socket connection?
Which of the following statements are true?
Which of the following system calls can be used to change process scheduling priority?
Which of the following system calls can be used to create device special files?
Which of the following system calls can be used to get the metadata of a file?
Which of the following system calls can be used to send a message via a connected socket?
Which of the following system calls creates a named socket?
Which of the following system calls increases the process priority?
Which of the following system calls is specific to debugging?
Which of the following system calls is the most memory efficient method of reading a file?
Which of the following utilities is used to generate a core file of a process on Linux?
Which of the following utilities is used to search out regular expressions in the input?
Which of the following utilities would you use on a standard Linux system to debug a running application?
Which system call is used to send a signal to another process?