TAILIEUCHUNG - THE JR PROGRAMMING LANGUAGE phần 2

Thực hiện chương trình TwoProcesses nhiều lần để xem liệu thứ tự của đầu ra khác nhau giữa các hành quyết. Nếu không, sau đó thêm một lời gọi của để buộc các thứ tự khác của đầu ra. 1,2 Thêm vào chương trình TwoProcesses một quá trình thứ ba, mà là để tìm các phần tử tối đa trong cả hai mảng. | 14 Introduction Execute the TwoProcesses program several times to see whether the order of output differs between executions. If not then add an invocation of to force the other order of output. Add to the TwoProcesses program a third process which is to find the maximum element in both of the arrays. a Compare the execution times of the sequential and parallel matrix multiplication programs for various size matrices. Which is more efficient b Modify the parallel program so that it uses only N processes each of which computes one row of result matrix C. Compare the performance of this program to your answers to part a . a Execute the concurrent file search program using different patterns and files on a UNIX system. Compare the output to that of the grep command. Now try piping the output of your JR program through the sort command and compare the output to that of grep. What happens if the file-name arguments to your JR program are given in alphabetical order b Modify the program to create instances of grep on different machines as described in Section . Experiment with this version of the program. Modify the concurrent file search program so that it allows the search string to be a regular expression. To save yourself a lot of work use an existing Java regular expression package like . Execute the critical section simulation program several times and examine the results. Also experiment with different nap intervals by modifying the argument to the nextInt method. Modify the program by deleting the phrase by id in the arbitrator process and execute this version of the program several times. How do the results compare to that of the original program What if by id is replaced by by - id PART I EXTENSIONS FOR CONCURRENCY This part of the text introduces JR s mechanisms for concurrent programming. JR extends Java with SR-like 9 concurrency mechanisms. Much of what we say about JR below applies equally well to SR .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.