关键词 > COMP211

COMP211.001.SP23 : Tests & Quizzes

发布时间:2024-05-13

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMP211 .001.SP23 : Tests & Quizzes

Quiz 7

What is allowed:

Course textbooks and supplemental reading documents.

Calculator.

If your course textbooks and/or supplemental reading documents are electronic, then you may use your computer to view them.

Other material/electronic media related to the course (includes lecture slides, or your own personal notes).

Your Linux/Docker computing environment.

What is not allowed:

Communicating with other students during the quiz.

Using a mobile device or the internet to search for answers/solutions to quiz questions.

Please follow the instructions outlined below.

Once you start the quiz (i.e. acknowledge the honor code and press the begin assessment button) you must complete in 40 minutes.

You cannot stop (or pause) the quiz and then restart it at a later time.

You may only take the quiz once.

Remember to periodically save your answers during the quiz. You can save as much as you want, the answers will not be submitted until you actually “submit” the quiz. If you submit the quiz without periodically saving, or saving at all, and nothing is submitted, we won’t be able to help.

When taking the quiz, only have one Sakai browser tab open and remain in that one tab. Do NOT open Sakai in additional browser tabs or windows. Doing so will cause you to lose your work.

If you don't follow these instructions: we won't be able to help you or let you retake the quiz.

Part 1

Which of the following would generate an asynchronous exception? Select all that apply.

A. Receiving a data packet over Wi-Fi

B. None of the above.

C. Process termination.

D. Input from a keyboard, such as Control+C.

E. Process creation.

F. Timing event.

Which of the following would cause the CPU to execute instructions in kernel mode? Select all that apply.

A. Interrupt

B. None of the above.

C. Trap

D. Fault

If a system call is atrap that transfers control to the kernel, and the kernel manages hardware (i.e., hardware I/O), then in the above program which of the following would generate a system call. Select all that apply.

A. return EXIT_SUCCESS;

B. input[i++] = c;

C. printf( "%s\n", input );

D. main()

E. scanf( "%d", &length );

F. c = getchar()

If a process enters the Ready to Run Queue, then which of the following could have happened? Select all that apply.

A. The schedulerselected this process to run on the CPU.

B. The process was created.

C. The process received input from the user.

D. The process was terminated because of a protection fault exception.

In the above program, if sleep() is a system call, then which of the follow could be used to describe the type(s) of exceptions generated? Select all that apply.

A. trap

B. asynchronous

C. None are correct.

D. abort

E. synchronous

Consider the program above and íll in the blank in the following statement.

The print statement on line 10 will run times over all of the processes invoked by this program. (Enter your response in decimal, i.e. base-10.)