1 / 8

2004/11/26

報告. 2004/11/26. 概観. 具体的なアプリに向けて 完了 IndexSet シリアライズ メッセージリレーの実験 オブジェクトの管理・ RMI 実装中 マイグレーション アプリ書く. RMI の実験. 簡単なメソッドで実験. [0-10)-[30-40). [10-20)-[40-50). [20-30)-[50-60). 分散集合 1. [0-10)-[30-40). [10-20)-[40-50). [20-30)-[50-60). 分散集合 2. (method_a, [30-40), “hoge”). (method_a

hop-foreman
Download Presentation

2004/11/26

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 報告 2004/11/26

  2. 概観 • 具体的なアプリに向けて • 完了 • IndexSet • シリアライズ • メッセージリレーの実験 • オブジェクトの管理・RMI • 実装中 • マイグレーション • アプリ書く

  3. RMIの実験 • 簡単なメソッドで実験 [0-10)-[30-40) [10-20)-[40-50) [20-30)-[50-60) 分散集合1 [0-10)-[30-40) [10-20)-[40-50) [20-30)-[50-60) 分散集合2 (method_a, [30-40), “hoge”) (method_a [15-20)-[40-50) , “hoge”) (method_a, [20-30)-[50-55) , “hoge”) send(分散集合2, method_a [15-55), “hoge”)

  4. マイグレーションの実験(予定) • 個々の断片に明示的に”退避”を指令 [0-10)-[30-40) [10-20)-[40-50) [20-30)-[50-60) 分散集合1 [0-10)-[30-40) [10-20)-[40-50) [20-30)-[50-60) 分散集合2 leave()

  5. main() • int npe = 3; • int pn = get_pn(); • int io_lower = (int)(vp_segment_width * pn / npe); • int io_upper = (int)(vp_segment_width * (pn + 1) / npe); • IndexSet * initial_is = new IndexSet(io_lower, io_upper); • InitialObject *io = new InitialObject(initial_is); • int lower, upper; lower = pn * 10; upper = (pn + 1) * 10; • DistributedArray *da = new DistributedArray(1, new IndexSet(lower, upper)); • DistributedArray *da2 = new DistributedArray(2, new IndexSet(lower, upper)); • pthread_t pth; • spawn_receiver(pth); • if(pn == 0){ • PackObject *po = new PackObject(); • po->pack_string("hello"); • rmi_send(1, new IndexSet(0, npe * 10), 0, po); • }

  6. 提供する関数 • void rmi_send(int, IndexSet *, method_kind_t, PackObject *); • void *receiver(void *); • void ro_assume_vps(int, ph_vp_t, ph_vp_t); • void register_fraction(int, RemoteObject *, IndexSet *); • class RemoteObject { • protected: • int object_id; • ph_vp_t vp_shift; • IndexSet *handle_is; • public: • void send(IndexSet *is, method_kind_t method_kind, PackObject *po) • { rmi_send(object_id, is, method_kind, po);} • virtual void recv(IndexSet *, method_kind_t, UnpackObject *)=0; • };

  7. クラス定義 • DistributedArray::DistributedArray(int _object_id, IndexSet *_handle_is){ • object_id = _object_id; • handle_is = _handle_is; • size = handle_is->size(); • A = new double[size]; • register_fraction(object_id, this, handle_is); • IndexSet *is0 = handle_is; • while(is0 != NULL){ • ro_assume_vps(object_id, is0->lower, is0->upper); • is0 = is0->next; • } • } • void DistributedArray::recv(IndexSet *is, method_kind_t method_kind, UnpackObject *upo){ • switch(method_kind){ • case 0: • method_a(is, upo); • break; • } • }

  8. 今後 • マイグレーション • アプリの記述 • できれば11月中

More Related