CS代考 CSE130 Midterm 1! Please keep in mind these instructions before you hit sta

 This quiz has been regraded; your score was not affected.
Midterm 1 MCQ
Due Oct 28 at 10am Points 65 Questions 13
Available Oct 28 at 8am – Oct 28 at 10am about 2 hours Time Limit 90 Minutes

Copyright By PowCoder代写 加微信 powcoder

Instructions
This is the MCQ exam
Read carefully! This text will also be on the Canvas exam as well.
Hello students,
Welcome to the CSE130 Midterm 1! Please keep in mind these instructions before you hit start:
1. There are two exams. You must complete both of these exams in order to complete the entire exam. Both exams have a hard time limit of 90 minutes each.
1. DRC accommodations have been noted and those who are eligible will be provided with extra time respectively.
2. The examination window starts at 8:00 AM PST and ends at 10:00 AM PST. You are allowed to start either exam’s 90-minute timer within this window.
3. You are not allowed to collaborate on the exam.
4. This exam is open book and open notes.
5. There are ~15 MC questions (barring any last-minute removals) and 8 FRQs, please read each question carefully before answering.
You are expected to hit submit for both exams BEFORE 10:00 AM PST. There is a 15 minute time window after 9:45 AM PST to allow for submissions in case of network connectivity issues. If you choose to submit at 10:00 AM PST and fail to submit due to network connectivity issues, you are at fault for waiting until the last minute.

We anticipate that you should budget your time as follows. Keep in mind that this is not a hard limit, but our predicted time allocation for each question:
15 MC x 3 mins = 45 mins
8 FRQ x 5 min = 40 mins
Total: 85 minutes
If you open the exam and do not see any questions, please try a different browser or Incognito Mode.
YOU ARE RESPONSIBLE FOR HITTING SUBMIT FOR THE EXAM. WE CANNOT GUARANTEE A GRADE FOR AN EXAM THAT IS NOT SUBMITTED.
While you take this exam, please CLOSE DISCORD. ALL ANNOUNCEMENTS RELATED TO THIS EXAM (including corrections) WILL BE ON A PINNED POST ON PIAZZA.
DO NOT CONTACT US ON DISCORD DURING THE EXAM.
IF YOU HAVE QUESTIONS RELATED TO THE EXAM, PLEASE ASK US IN A PRIVATE POST ON PIAZZA. PUBLIC POSTS WILL BE DELETED WITH UTMOST PREJUDICE.
After the exam, do not discuss exam content on discord or Piazza until the DRC students have finished. We will make an announcement of when you are free to discuss the exam’s contents. We expect this time to be approximately 11:30 AM PST.
This quiz was locked Oct 28 at 10am.
Attempt History
Attempt Time Score Regraded

Attempt Time Score Regraded
LATEST Attempt 1 26 minutes 40 out of 65 40 out of 65
Question 1
When we bind a name N to a value V in a context C, it is necessary to ensure that:
(b) There is no other value V’ that N points to in C. (c) Both (a) and (b) are correct.
(a) There is no other name N’ in C that points to V. (d) Neither (a) nor (b) is correct.
Question 2
Suppose that “file” is a filename read from standard input. What is the expected result of the following code sample?
char buf[13] = “Hello, World!”;
int fd = open(file, O_WRONLY | O_TRUNC); int bytes_written = write(fd, buf, 13);
Score for this quiz: 40 out of 65 Submitted Oct 28 at 8:28am This attempt took 26 minutes.

ou Answered
Bytes_written = -1.
Opens “file” for writing and overwrites the contents of “file” with the contents of “buf.”
Opens “file” for writing and appends the contents of “buf” to the contents of “file.”
Not enough information.
rrect Answer
Question 3
For a fixed size queue throughput is inversely proportional to latency.
rrect Answer
ou Answered
Question 4
In the interpreter abstraction applied to a CPU, which of the following is part of the repertoire?
Program Counter Stack Pointer

Exceptions Instruction Set
Question 5
A misbehaving client can interfere with a server by:
Overwriting a shared memory region.
None of these are correct
Sending it more data than it knows how to handle. Returning into the wrong location.
Question 6
fd is a descriptor for a normal file (not a pipe or stream) of length L > 50 that has just been
opened (but not yet read), and that buffer is declared as uint8_t buffer[B], where B > 50. Which of the following is not a possible return value from read(fd, buffer, sizeof(buffer))?
rrect Answer
ou Answered

Question 7
Alice looks up the address of her favorite website. It resolves to Bob’s IP address. Bob does not, however, have the webpage that Alice is looking for. Instead, after a quick lookup, Bob decides to connect to Carol, who has a copy of the page and is not too busy right now. Bob downloads the page that Alice wants from Carol, and uploads it to Alice. Bob is acting as a:
Load balancer
All of these are correct
Question 8
If you are a computer in San Francisco, and you want to send a message to a computer in London, United Kingdom, how can you 100% ensure that the London computer either did, or did not, receive your message?
If no reply came in 10 minutes, then the London computer for sure didn’t receive the message.

Get a response from any intermediate router about the availability of the London computer
This is impossible.
Receive an ACK from the London computer.
Question 9
Original Score: 0 / 5 pts Regraded Score: 0 / 5 pts
 This question has been regraded.
Which of the following should generate a 500 response code (internal server error) in an HTTP server?
ou Answered
open() returns an error on a PUT because the client asked to write a file that has no write permissions
ou Answered
open() returns an error because the file doesn’t exist
open() returns an error because the server doesn’t have permission to read a file
ou Answered
rrect Answer
write() returns an error while the server is writing user data for a PUT operation

Question 10
Abstraction, modularity, layering and hierarchy are techniques for managing complexity. Although they differ in their details, all of them reduce complexity by:
Hiding private data from untrusted components
Isolating components from faults in other components
Hiding the details of a component’s implementation from its users Reducing the possible interactions among components
Question 11
Which of the following is an example of modularity: All of these are correct
Grouping a collection of functions and data over which they operate into a class
Hosting functionality as a server on a remote machine Moving code into a function
Question 12

Compared to soft modularity via procedure calls, client server systems have _________________ .
More possible executions. Stronger isolation from faults.
All of these are correct
More complicated implementations
Question 13
A thread virtualizes a ____________________ via aggregation.
None of these are correct Processor
rrect Answer
ou Answered
Quiz Score: 40 out of 65

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com