Question

[Distributed Systems] Which of the following tasks is not easily parallelizable? Counting the frequency of words in a collect

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A.

The correct option is

Booking airline tickets for thousands of customers.

This is because the tickets are limited, and we need to keep track of the current number of tickets issued and remaining. So, some form of synchronization, to update shared variables like remaining_tickets, would need to be maintained after EVERY transaction by every thread.

Regarding other options :

  • Counting the frequency of words in a collection of text files
    • Here, each text file is static, and may be processed independently and parallely, and then the results can be combined once at end.
  • Querying a read-only database
    • Read-only database is static, so multiple read-transactions can be carried out parallely by multiple threads safely.
  • Identifying major geographical features on a satellite map
    • ​​​​​​​Geographical locations are static (or at least change so slowly to be hardly noticeable in a short time). So separate areas may be identified parallely, and then results can be combined once at end.

B.

The correct option is

The OS filesystem creates an empty file ar the specified path.

Regarding other options :

  • The program is terminated by an exception
    • ​​​​​​​This happens when a program runs into undefined/unrecoverable statw, eg. division by zero.
  • The program is terminated by a segmentation fault
    • ​​​​​​​This happens when programs tries to access protected memory, eg. writing to a read-only memory-segment.
  • The OS writes an I/O error to its syscall log and allows the program to continue
    • ​​​​​​​This is very, very, very unlikely, as result of any user-operation (here, opening a file) must be passed to the user. All POSIX APIs adhere to this.
Add a comment
Know the answer?
Add Answer to:
[Distributed Systems] Which of the following tasks is not easily parallelizable? Counting the frequency of words...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT