1/145
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
[TCPIP-UNP] ______ is a computer network diagnostic tool for displaying the route (path) and measuring transit delays of packets across an Internet Protocol (IP) network. The history of the route is recorded as the round-trip times of the packets received from each successive host (remote node) in the route (path); the sum of the mean times in each hop is a measure of the total time spent to establish the connection.
traceroute
[TCPIP-UNP] Consider client-server model. Which one of the following choices is NOT correct?
There are three main classes of servers: synchronous, iterative, and concurrent.
[TCPIP-UNP] Consider IPv4 and IPv6. Which one of the following choices is NOT correct?
IPv4 uses 16-bit addresses.
[TCPIP-UNP] Consider TCP socket programming. Which one of the following choices is NOT correct?
All three transport layers (UDP, SCTP and TCP) use 32-bit integer port numbers.
TCPIP-UNP] Client needs to know Server's IP address and port to be connected. Server's IP address (sin_addr) and port number (sin_port) fields in the Internet socket address structure (sockaddr_in) must be in specific formats. This ____ function converts a binary port number to the proper format (sin_port).
htons
___ is like a mutex, except that instead of blocking a process by sleeping, the process is blocked by busy-waiting until the lock can be acquired.
spin-lock
With this locking mechanism, there are two functions to notify threads that a condition has been satisfied. The ____ function will wake up at least one thread waiting on a condition, whereas the ____ function will wake up all threads waiting on a condition.
pthread_cond_signal, pthread_cond_broadcast
[APUE11.6] Although implementations vary, reader-writer locks usually block additional readers if a lock is already held in read mode and a thread is blocked trying to acquire the lock in write mode. This prevents a constant stream of readers from ____ waiting writers.
starving
[APUE11.6] With multiple threads of control, we can design our programs to do more than one thing at a time within a single process, with each thread handling a separate task. This approach can have several benefits.Which one of the following statements is NOT correct?
Asynchronous programming model is much simpler than Synchronous one.
[APUE11.6] _____ is called shared-exclusive lock. When it is read locked, it is said to be locked in shared mode. When it is write locked, it is said to be locked in exclusive mode.
reader-writer lock
[APUE11.6] ____ is often used as low-level primitives to implement other types of locks. Depending on the system architecture, they can be implemented efficiently using test-and-set instructions.
spinlock
[APUE11.6] ____ is useful when used in a nonpreemptive kernel: besides providing a mutual exclusion mechanism, they block interrupts so an interrupt handler can't deadlock the system by trying to acquire a spin lock that is already locked (think of interrupts as another type of preemption). In these types of kernels, interrupt handlers can't sleep, so the only synchronization primitives they can use are ____.
spinlock
[APUE11.6] The _____ mechanism works only if we design our threads to follow the same data-access rules. The operating system doesn't serialize access to data for us. If we allow one thread to access a shared resource without first acquiring a lock, then inconsistencies can occur even though the rest of our threads do acquire the lock before attempting to access the shared resource.
mutual-exclusion
[APUE11.6] When a reader-writer lock is ____ locked, only one thread to ____ can have it while all threads attempting to read must wait until it is unlocked.
write
[APUE16] Which of the following is a transport layer protocol (TCP):
UDP
Which of the following statements about socket programming (out-of-band) is not correct?
TCP and UDP support out-of-band data.
[APUE16] ___ allows processes running on different computers (connected to a common network) to communicate with one another.
socket
[APUE16] Which of the following is an application layer program designed to run on top of TCP:
All of the above
[APUE16] Which of the following terms is used to denote units of data being transmitted:
All of the above
[APUE16] A protocol architecture (e.g., TCP/IP) performs a task by implementing it as:
Separate program modules, responsible for subtasks, that cooperate with each other
[APUE16] Which of the following statements about socket programming (socket descriptor) is not correct?
If the socket descriptor is in blocking mode, the application can use either poll or select to determine when the file descriptor is readable.
[APUE16] Which of the following statements about socket programming (accept function) is not correct?
accept provides non-blocking socket.
[APUE16] To write code for port-to-port communication (e.g., TCP/IP), a programmer uses:
The socket application programming interface
[APUE16] Which of the following statements about socket programming (socket address) is not correct?
The address associated with a client's socket must be known to the server with datagram.
According to the authors. Which one of the following statements is NOT correct about PIPE?
Pipe is created by calling pipe call with two arguments.
[APUE15] According to the authors. Consider the pclose call. Which one of the following statements is NOT correct?
The pclose function terminates the child process
[APUE15] According to the authors. Consider the popen and pclose functions which will do ____. Which one of the following statements is NOT correct?
fork a parent process and a child process in a pipeline
[APUE15] According to the authors. Consider Message Queue.On Linux, for example, the maximum number of messages is based on the maximum number of queues and the maximum amount of data allowed on the queues. The maximum number of queues, in turn, is based on the amount of ___ installed in the system. Note that the queue maximum byte size limit further limits the maximum size of a message to be placed on a queue.Select the best choice for the fill-in.
RAM Memory
[APUE15] According to the authors. When one end of a pipe is closed, two rules apply. Which one of the following statements is NOT correct?
One can write to a pipe whose write end has been closed.
[Cloud] Consider the major benefits of Cloud Computing as discussed in the class. ____ is about flexibility for users with re-provisioning, adding, or expanding technological infrastructure resources. Which one of the following choices is correct? Select the best answer.
Organizational Agility
[Cloud] Consider the Cloud Computing as discussed in the class.Amazon has been pioneering and providing one of the most popular cloud computing platforms and services including Amazon Web Services (AWS) and ____.Which one of the following choices is Correct?
Elastic Compute Cloud (EC2).
[Cloud] Consider Five Essential Characteristics of Cloud Computing (NIST) as discussed in the class.The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand. This is about _____.
Resource pooling
[Cloud] Consider the major benefits of Cloud Computing as discussed in the class.Pricing on a utility computing basis can be simplified or "fine-grained" with usage-based billing options. Cloud computing get the job done for users with less in-house IT skills than needed normally.This generates or causes one of the following benefits.Which one of the following choices is Correct? Select the best answer.
Cost Reduction
If a thread knows that no thread cares about its return value, then which of the following functions does it call to indicate that resources associated with it can be released on termination?
pthread_detach
Consider the following function to be run by a thread.void PrintHello(void threadid) { . . . }pthread_t tid;int rc;Which of the following statement is correct to create a thread that executes a function called PrintHello?
rc = pthread_create(&tid, NULL, PrintHello, (void *)1);
What is a thread primitive, corresponding to waitpid for process?
pthread_join
Which of the following functions is used by a thread to obtain its ID?
pthread_self
Which of the following functions is used to create a thread?
pthread_create
If any thread within a process calls exit, _Exit, or _exit, then what is expected?
the entire process (with all of its threads) terminates
Assume that you have two mutexes, A and B, that you need to lock at the same time. If all threads always lock mutex A before mutex B, _____.
Deadlocks can be avoided with these two mutexes.
We can protect our data and ensure access by only one thread at a time by using the pthreads mutual-exclusion interfaces. A(n) ____ is basically a lock that we set (lock) before accessing a shared resource and release (unlock) when we're done.
mutex
While it is set, any other thread that tries to set it will block until we release the ____. If more than one thread is blocked when we unlock the ____, then all threads blocked on the lock will be made runnable, and the first one to run will be able to set the lock. The others will see that the ____ is still locked and go back to waiting for it to become available again.
mutex
One additional mutex primitive allows us to bound the time that a thread blocks when a mutex it is trying to acquire is already locked. The ____ function is equivalent to pthread_mutex_lock, but if the timeout value is reached, it will return the error code ETIMEDOUT without locking the mutex.
pthread_mutex_timedlock
A typical UNIX _____ can be thought of as having a single thread of control (that is, doing only one thing at a time).
process
___ is a synchronization mechanism that can be used to coordinate multiple threads working in parallel. It allows each thread to wait until all cooperating threads have reached the same point, and then continue executing from there.
barrier
When multiple threads of control share the same memory, each thread should see a consistent view of its data. Which one of the following statements is NOT correct?
A variable which is read-only could create a consistency problem with more than one thread reading its value at the same time.
To write lock a reader-writer lock, we call
pthread_rwlock_wrlock
To initialize a mutex with the default attributes, we set attr to NULL. To lock a mutex, we call ____. If the mutex is already locked, the calling thread will block until the mutex is unlocked. To unlock a mutex, we call ____.
pthread_mutex_lock, pthread_mutex_unlock
The pthread_join function acts as a ____ to allow one thread to wait until another thread exits.
barrier
The condition is the state of the work queue... (summary: describes signaling in a while loop after mutex unlock)
conditional variable
Only one thread at a time can hold a(n) ____ in write mode, but multiple threads can hold a(n) ____ in read mode at the same time.
reader-writer lock
_____ is well suited for situations in which data structures are read more often than they are modified...
reader-writer lock
At user level, ____ is not as useful unless you are running in a real-time scheduling class...
spinlock
Which of the following statements about socket programming (address byte ordering) is not correct?
For a 32-bit integer with the value 0x04030201, the most significant byte is 0x01, and the least significant byte is 0x04 for little-endian byte order.
Which of the following statements about socket is NOT correct?
Many of the functions with file descriptors (e.g., read or write) will not work with a socket descriptor.
Which of the following is common to both TCP and UDP:
Port-to-port communication
As a data unit moves up from one protocol layer to another (e.g., for TCP/IP), control headers are:
Removed
___ is a network utility tool that displays the local host's network connections for transmission control protocol ((both incoming and outgoing), routing tables, and a number of network interface and network protocol statistics. It is used for finding problems in the network and to determine the amount of traffic on the network as a performance measurement. This command is used to find which TCP port is bound or free so that one may choose a free port for one's server to bind and listen.
netstat
[TCPIP-UNP] Consider TCP socket programming. The following diagram illustrates _____ process.Diagram:socket()|\/bind()|\/listen()|\/accept()|\/blocks until connection
Server-side
[TCPIP-UNP] The following output shows the result of ____ utility.64 bytes from 93.184.216.119: icmp_seq=0 ttl=56 time=11.632 ms64 bytes from 93.184.216.119: icmp_seq=1 ttl=56 time=11.726 ms64 bytes from 93.184.216.119: icmp_seq=2 ttl=56 time=10.683 ms64 bytes from 93.184.216.119: icmp_seq=3 ttl=56 time=9.674 ms64 bytes from 93.184.216.119: icmp_seq=4 ttl=56 time=11.127 ms
ping
TCPIP-UNP] Consider TCP socket programming. Which one of the following choices is NOT correct?
All three transport layers (UDP, SCTP and TCP) use 32-bit integer port numbers.
TCPIP-UNP] Client needs to know Server's IP address and port to be connected. Server's IP address (sin_addr) and port number (sin_port) fields in the Internet socket address structure (sockaddr_in) must be in specific formats. This ____ function convert an IP address in ASCII command-line argument (for example, "192.10.16.4") into the proper format (sin_addr).
inet_aton or inet_addr
[TCPIP-UNP] _____ is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed. If no arguments are given, it displays the status of the currently active interfaces.
ifconfig
Which of the following statements about socket programming with SOCK_STREAM (TCP) is not correct?
after the connection in place, one can communicate to the other in one direction.
Which of the following statements about socket programming with datagram is not correct?
Datagram provides a connection-oriented service.
Which of the following statements about socket programming (close and shutdown) is NOT correct?
an application can shut a socket down for writing while still allowing to receive data sent by the process.
Which of the following statements about socket programming is not correct?
Applications with their own customized protocol headers cannot bypass the transport protocols (TCP and UDP, for example).
In a layered protocol architecture (e.g., TCP/IP), a benefit and rationale for a module at one layer relying on another module at the layer below for some service is:
All of the above
A protocol architecture (e.g., TCP/IP) performs a task by implementing it as:
Separate program modules, responsible for subtasks, that cooperate with each other
Which of the following terms is used to denote units of data being transmitted:
All of the above
Which of the following is an application layer protocol (e.g., in TCP/IP model).
Telnet
A service provided by TCP is:
Flow control
The single most important motive for the new IPv6 protocol is:
Address space expansion
[APUE16] To write code for port-to-port communication (e.g., TCP/IP), a programmer uses:
The socket application programming interface
[APUE16] Which of the following statements about socket programming (socket address) is not correct?
The address associated with a client's socket must be known to the server with datagram.
According to the authors. Which one of the following statements is NOT correct? Consider a semaphore to control only one resource.
The semaphore value is initialized to 0.
According to the authors. When one end of a pipe is closed, two rules apply. Consider the following code segment.int fd[2]; pipe(fd);Which one of the following statements is CORRECT?
For a pipe from the child to the parent, the parent closes fd[1], and the child closes fd[0].
According to the authors. Which one of the following statements is NOT correct about PIPE?
pipe is created by calling pipe with two arguments.
According to the authors. Consider the popen call as shown below.fp = popen(cmdstring, "r");Which one of the following statements is NOT correct?
The file pointer returned is connected to the standard input of cmdstring
According to the authors. Which one of the following statements is CORRECT?When a process is done with a shared resource that is controlled by a semaphore, the semaphore ______.
value is incremented by 1
According to the authors. Consider the popen call as shown below.fp = popen(cmdstring, "w");Which one of the following statements is NOT correct?
The returned file pointer is readable if type is "w"
According to the authors. Consider the popen and pclose functions which will do ____. Which one of the following statements is NOT correct?
fork a parent process and a child process in a pipeline
[APUE15] According to the authors. Which one of the following statements is NOT correct?
The Bourne-again shell provides a way to connect processes together as coprocesses
[APUE15] According to the authors. Which one of the following statements is NOT correct?
Answer: FIFOs are sometimes called anonymous pipes.
[APUE15] According to the authors. Consider the use of FIFO for shell commands in pipeline or for multiple-clients and the server. Which one of the following statements is NOT correct?
Answer: Multiple client-writers should keep the requests to be more than PIPE_BUF bytes in size.
[APUE15] According to the authors. Which one of the following statements is NOT correct? Consider Message Queue.
Answer: A message queue is a linked list of messages stored within user process.
[APUE15] According to the authors. Which one of the following statements is NOT correct about PIPE?
Answer: All Linux systems now provide full-duplex pipes.
[Cloud]Consider Five Essential Characteristics of Cloud Computing (NIST).A consumer can unilaterally provision computing capabilities without requiring human interaction with each service provider.
Answer: On-demand self-service
Capabilities can be elastically provisioned and released to scale rapidly.
Rapid elasticity
Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations). This is about _____.
Broad network access
The main enabling technology for cloud computing is _____.
virtualization
Critical computing resources provided by the provider can be accessed from anywhere.
Easier Maintenance
______ Model applies to any distributed application with service providers and service requestors.
Client-Server
The capability provided is to use the provider's applications; no control over infrastructure.
Software as a Service (SaaS)
Users can access systems via a web browser regardless of location or device.
Global Services
Which of the following service models is NOT correct?
Application as a Service (AaaS)
Which of the following essential characteristics is NOT correct?
Telemarketing service
Cloud computing is designed to ____. Which one is NOT correct?
to explore and share the in-house IT expertise in cloud computing.
Which of the following is NOT correct about cloud computing
It is to make resources available in any cloudy situations.
Public-cloud delivery converts capital expenses into operational expenses.
Cost Reduction