TAILIEUCHUNG - THE JR PROGRAMMING LANGUAGE phần 5

Bây giờ hãy thử hệ thống đường ống đầu ra của chương trình JR của bạn thông qua các lệnh sắp xếp, và so sánh các đầu ra của grep. Điều gì sẽ xảy ra nếu các đối số tên tập tin vào chương trình JR của bạn được đưa ra trong | 134 Rendezvous special number . zero to filter. Which technique is more general and cleaner Consider the following operation declarations and input statement op void a double op void b char Iinni void atdouble d void b char c Assume that these operations are invoked only by call. Show how the input statement can be replaced by a receive statement. Also show how a and b must now be invoked. Consider the following input statement from the prime sieve algorithm see Section inni void filterCint y void doneO break Within its containing loop it services all invocations of filter and then an invocation of done. The reason for that ordering of invocation servicing is that the semantics of JR s input statement picks which operation to service based on the arrival times of the invocations. Suppose that the semantics of JR s input statement were that instead the operation for which to service an invocation is picked in a non-deterministic order. Show how the above input statement would need to be written so that all invocations are handled in the same order as they are now. A binary search tree. Write a JR program that reads in a list of numbers builds a binary search tree from processes and then responds to print inorder and search commands. Your solution is to be similar in spirit to the pipeline sort program see Section and the prime sieve algorithm see Section . Specifically use one process for each node in the tree which holds one number from the input. You do not know in advance how many node processes are needed which means that they must be created on demand. Exercises 135 All processes must be created within a single object. Use local operations capabilities and the reply statement do not use an array of operations. Your program should terminate normally not in deadlock. For a search output whether the number exists in the tree or if it was not found the number in the node that determined it was not in the tree. Source files containing

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.