Wednesday, December 4, 2019

Quiz 10 19FL-IT280-01 - Object Oriented Programming

  • Question 1

    4 out of 4 points
    Few modern computers use threads to represent processes.
    Answers:
    True
    Correct
    False
  • Question 2

    4 out of 4 points
    What two items must be given to the socket function in order to create a socket object?
    Answers:
    a. 
    Correctb. 
    Correctc. 
    d. 
  • Question 3

    4 out of 4 points
    The release() method of the Condition class relinquishes the lock, leaving it to be acquired by others.
    Answers:
    Correct
    True
    False
  • Question 4

    4 out of 4 points
    When developing a network application, the programmer can first try it out on a local host—that is, on a standalone computer that may or may not be connected to the Internet.
    Answers:
    Correct
    True
    False
  • Question 5

    4 out of 4 points
    What thread method can be used to test if the thread is dead or not?
    Answers:
    a. 
    b. 
    Correctc. 
    d. 
  • Question 6

    4 out of 4 points
    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?
    Answers:
    a. 
    b. 
    Correctc. 
    d. 
  • Question 7

    4 out of 4 points
    Which of the following is an example of time slicing?
    Answers:
    a. 
    b. 
    Correctc. 
    d. 
  • Question 8

    4 out of 4 points
    A thread that is waiting for user input is most likely in what state?
    Answers:
    a. 
    b. 
    c. 
    Correctd. 
  • Question 9

    4 out of 4 points
    The procedure by which a process's state is saved before being swapped out of the CPU, then us restored to the state when the process is about to execute, is known as?
    Answers:
    Correcta. 
    b. 
    c. 
    d. 
  • Question 10

    4 out of 4 points
    A socket is bound to an address (host, port) by running its bind method.
    Answers:
    Correct
    True
    False
  • Question 11

    4 out of 4 points
    A program starting another program or a new process is known by what term?
    Answers:
    a. 
    b. 
    c. 
    Correctd. 
  • Question 12

    4 out of 4 points
    In order to execute code in a thread as a process, what must be done?
    Answers:
    a. 
    b. 
    Correctc. 
    d. 
  • Question 13

    4 out of 4 points
    What does the socket module function gethostname() do?
    Answers:
    a. 
    b. 
    c. 
    Correctd. 
  • Question 14

    4 out of 4 points
    Because an IDLE itself runs in a thread, it is not generally a good idea to test a multithreaded application in that environment.
    Answers:
    Correct
    True
    False
  • Question 15

    4 out of 4 points
    A port serves as a channel through which several clients can exchange data with the same server or with different servers.
    Answers:
    Correct
    True
    False
  • Question 16

    4 out of 4 points
    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.
    Answers:
    Correct
    True
    False
  • Question 17

    4 out of 4 points
    Producer/consumer threads can suffer from synchronization problems.
    Answers:
    Correct
    True
    False
  • Question 18

    4 out of 4 points
    What is the socket bind method used for?
    Answers:
    a. 
    b. 
    c. 
    Correctd. 
  • Question 19

    4 out of 4 points
    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?
    Answers:
    Correcta. 
    b. 
    c. 
    d. 
  • Question 20

    4 out of 4 points
    After using the socket.recv method, what type of data is returned?
    Answers:
    Correcta. 
    b. 
    c. 
    d. 
  • Question 21

    4 out of 4 points
    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?
    Answers:
    a. 
    Correctb. 
    c. 
    d. 
  • Question 22

    4 out of 4 points
    What two thread condition methods can be used to release a lock? (Choose two.)
    Answers:
    Correcta. 
    Correctb. 
    c. 
    d. 
  • Question 23

    4 out of 4 points
    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?
    Answers:
    Correcta. 
    b. 
    c. 
    d. 
  • Question 24

    4 out of 4 points
    You cannot create and open several sockets on the same port of a host computer.
    Answers:
    True
    Correct
    False
  • Question 25

    4 out of 4 points
    The most common way to create a thread is to define a class that extends the class threading.Runnable.
    Answers:
    True
    Correct
    False

0 comments:

Post a Comment