TAILIEUCHUNG - wiley interscience tools and environments for parallel and distributed computing phần 7

khởi tạo các biến nội bộ như số lượng / / hàng của ma trận / / điều này có thể xử lý DCOM DCOM hỗ trợ bảo mật mạnh mẽ bằng cách cho phép người dùng chỉ định xác thực userlevel và cấp quyền truy cập (thông qua danh sách kiểm soát truy cập) đối với đối tượng. | 122 DISTRIBUTED-OBJECT COMPUTING TOOLS super initialize the internal variables like the number of rows of the matrix this can handle end of constructor public MatrixRMI createNewMatrix int iRows int iCols throws RemoteException return new MatrixRMIImpl iRows iCols end of createNewMatrix public MatrixRMI doMultiply MatrixRMI matA MatrixRMI vectorB throws RemoteException try create proc1 and proc2 object refer ences for the two processors running in two different machines ProcessorRMI proc1 ProcessorRMI rmi pegasus Multiplier-Processor ProcessorRMI proc2 ProcessorRMI rmi reliant Multiplier-Processor perform checks on the number of rows and columns initialize the result matrix MatrixRMI resultMatrix resultMatrix new MatrixRMIImpl rowsA colsB A shared buffer which is synchronized is used for this purpose Buffer syncBuf new Buffer vectorB have two threads for computing each of the two rows of the result matrix these threads will invoke doProduct methods of the processor object RowMultiplier1 t1 new RowMultiplier1 proc1 syncBuf row2 resultMatrix RowMultiplier2 t2 new RowMultiplier2 proc2 syncBuf row1 resultMatrix EXAMPLES 123 while do nothing wait results are already in resultMatrix return the merged matrix vector return resultMatrix catch Exception e Exception in Client throw new RemoteException end of doMultiply end of MatrixManagerRMIImpl The implementation for the RowMultiplier and buffer are not shown here. Implementation of the Matrix Server import . import . public class MatrixRMIServer public static void main String args new RMISecurityManager try MatrixManagerRMIImpl matMgrObject new MatrixManagerRMIImpl MatrixManager RMI Object Created MatrixManager matMgrObject Binding Done catch Exception e Exception in .

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.