Filters
Question type

Study Flashcards

The discipline of building hardware architectures, operating systems, and specialized algorithms for running a program on a cluster of processors is known by what term?


A) multi-computing
B) resource sharing
C) process distributing
D) parallel computing

E) B) and D)
F) None of the above

Correct Answer

verifed

verified

What two Python data structures are already thread-safe, because they provide automatic support for synchronizing multiple readers and writers? (Choose two.)


A) tuples
B) strings
C) lists
D) dictionaries

E) None of the above
F) A) and B)

Correct Answer

verifed

verified

The process of saving or restoring a thread's state is called a scheduling switch.

A) True
B) False

Correct Answer

verifed

verified

What statement accurately describes the role of a socket?


A) A socket is an object that serves as a communication link between a single server process and a single client process.
B) A socket is a named pipe that is used to pass communications one way to a remote location.
C) A socket is a unique computer resource that provides access to hardware.
D) A socket is a communications channel within the TCP/IP stack that communicates only with the localhost.

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

A thread object can die if it raises an exception that is not handled.

A) True
B) False

Correct Answer

verifed

verified

In the event that a thread loses access to the CPU, such as via a time-out, sleep, block, or wait state, what happens when the thread is ready to resume execution?


A) The thread is moved to the front of the ready-queue.
B) The thread is moved to the rear of the ready-queue.
C) The thread is given a chance to execute as soon as the running process enters a wait state.
D) The thread is given a random interval to check if it is the thread's turn to execute, or if the processor is available.

E) None of the above
F) C) and D)

Correct Answer

verifed

verified

Assuming that a socket has been created with a name of server, what effect does the server.listen(10) have?


A) The socket will listen for a maximum of 10 minutes, and then close.
B) The socket will allow a maximum of 10 connections, then close.
C) The socket will accept a maximum of 10 concurrent connections.
D) The socket will listen until the integer "10" is seen in the data stream.

E) A) and C)
F) A) and D)

Correct Answer

verifed

verified

What is the purpose of a condition object in a threaded application?


A) The condition object functions as a lock on a resource.
B) The condition object provides a similar function to if-else in threads.
C) The condition object provides a try-except function in threads.
D) The condition object functions as a timer for the ready-queue.

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

A port serves as a channel through which several clients can exchange data with the same server or with different servers.

A) True
B) False

Correct Answer

verifed

verified

Clients connect to servers via objects known as channels.

A) True
B) False

Correct Answer

verifed

verified

The late 1960s and early 1970s saw the rise of networked systems.

A) True
B) False

Correct Answer

verifed

verified

When a thread's run method has executed its last instruction, the thread dies as a process but continues to exist as an object.

A) True
B) False

Correct Answer

verifed

verified

When working with sockets, it is important to synchronize the sending and the receiving of messages between the client and the server.

A) True
B) False

Correct Answer

verifed

verified

What kind of problem occurs in a producer/consumer relationship in which the consumer attempts to access data that are not there, or accesses the same data more than once?


A) procedural problems
B) communication problems
C) coordination problems
D) synchronization problems

E) A) and D)
F) B) and D)

Correct Answer

verifed

verified

Few modern computers use threads to represent processes.

A) True
B) False

Correct Answer

verifed

verified

You have just captured data using the socket.recv method into a variable named client_data. What can you use to convert client_data to a string?


A) codecs.decode(client_data, "string")
B) socket.decode(client_data, type="string")
C) codecs.decode(client_data, 'ascii')
D) network.data(client_data, %s)

E) A) and D)
F) B) and C)

Correct Answer

verifed

verified

You are designing a script that needs to get the current date and time as a string. What function can you use for this?


A) time.ptime
B) time.ctime
C) time.today
D) time.now

E) A) and D)
F) B) and D)

Correct Answer

verifed

verified

Time-sharing systems are still in widespread use in the form of Web servers, e-mail servers, print servers, and other kinds of servers on networked systems.

A) True
B) False

Correct Answer

verifed

verified

A socket is bound to an address (host, port) by running its bind method.

A) True
B) False

Correct Answer

verifed

verified

What two items must be passed in a tuple to the socket module's connect method in order to connect a socket? (Choose two.)


A) The target host's IP address.
B) The protocol type that will be used.
C) The operating system used by the host.
D) A valid port number.

E) A) and C)
F) All of the above

Correct Answer

verifed

verified

Showing 21 - 40 of 50

Related Exams

Show Answer