____________ and ____________ are custom signals that can
be used for user-defined purposes, such as triggering specific
actions within a process.
A) - SIGHUP and SIGKILL
B) - SIGUSR1 and SIGUSR2
C) - SIGILL and SIGSEGV
D) - SIGINT and SIGKILL Correct Answer B) - SIGUSR1 and
SIGUSR2
________________ are programming constructs that set up a
group of parameters that identifies the process request and then
executes the hardware-dependent CPU instruction switch from
User Mode to kernel Mode.
A) - functions
B) - interrupts
C) - processes
D) - system calls Correct Answer D) - system calls
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int open(char *filename, int flags, mode_t mode);
The open function converts a filename to a file descriptor and
returns the descriptor number. The descriptor returned is always
the smallest descriptor that is not currently open in the process.
(T/F) Correct Answer True
,<sys/types.h> header defines the various data types used in
socket related functions. Choose the common types you
encounter here.
A) - ssize_t
B) - socklen_t
C) - size_t
D) - pid_t Correct Answer All the above
A) - ssize_t
B) - socklen_t
C) - size_t
D) - pid_t
A "strong" semaphore is one that always achieves mutual
exclusion. (T/F) Correct Answer True
A condition variable is used to wait until a particular condition
is true. Condition variables must be used in conjunction with a
mutex lock. (T/F) Correct Answer True
A deadlock might occur when one thread tries to send a message
from user A to user B while another tries to send a message
from user B to user A (T/F) Correct Answer True
A signal can be received at any time, and a signal handler can
execute at any time. (T/F) Correct Answer True
A special zombie process state represents terminated processes
(T/F) Correct Answer True
, A thread can be bound to multiple processes. (T/F) Correct
Answer False
After a successful call to execv (Select all that apply)
A) - execv returns the new process ID
B) - file descriptors other than 0, 1, 2 (stdin, stdout, and stderr)
are closed
C) -instructions are executed at the beginning of main()
D) - an executable specified as an argument to execv is loaded
Correct Answer C) -instructions are executed at the beginning
of main()
D) - an executable specified as an argument to execv is loaded
After a successful dup2() call, what is the relationship between
oldfd and newfd?
A) - They refer to different files
B) - They become disconnected from the file system
C) - They refer to the same file
D) - They no longer exist Correct Answer C) - They refer to
the same file
Application programs can convert back and forth between IP
addresses and dotted-decimal strings using the functions
_______________
A) - ntohs and htons
B) - ntohl and htonl
C) - inet_pton and inet_ntop
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Classroom. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.99. You're not tied to anything after your purchase.