1 / 11

Coding environment infrastructure for efficient parallel computing

Industrial Project - 234313. Coding environment infrastructure for efficient parallel computing. Team. Developers: Vlad Krasnov Ady Abraham Supervisor: Dr. Roee Engelberg , LSI. Goals. Make programming with asynchronous non-blocking APIs intuitive. Preserve maximal efficiency.

Télécharger la présentation

Coding environment infrastructure for efficient parallel computing

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. Industrial Project - 234313 Coding environment infrastructure for efficientparallel computing

  2. Team • Developers: VladKrasnov Ady Abraham • Supervisor: Dr. Roee Engelberg, LSI

  3. Goals • Make programming with asynchronous non-blocking APIs intuitive. • Preserve maximal efficiency. The Project’s Goal: Legacy model: A(){ //some code here... some_async_IO(decision1); } decision1(){ if(...) C(); else B(); } B(){ //some code here... some_async_IO(A); } C(){ //some code here... some_async_IO(exit_func); } exit_func(){ return; } START(EXAMPLE); ASYNC(A); WHILE(...) ASYNC(B); ASYNC(A); ENDWHILE; ASYNC(C); END; // execution point EXEC(EXAMPLE);

  4. Methodology • Define abstract computation model • Syntax definition. • Framework implementation in order to run the required flow. • Debug and validation.

  5. Achievements • Framework with MACRO based syntax that provides Turing-complete semantics. • Second tier API with debugging capabilities. • Natural easy-to-use easy-to-read syntax. • No training required.

  6. Achievements • Supports: • Synchronous functions. • Asynchronous functions. • If • While • Break • Goto / Labels • Exit

  7. Example(legacy code) void GetAddressForWrite(void* ctx) { read_map(ctx, Continue1, ctx); // top snapshot } void Continue1(void* ctx) { if(error_occured(ctx)){ give_up_chunk(ctx); return; } if(map_exists(ctx)){ // in top snapshot update_address(ctx); return; } Loop(ctx); } void Loop(void* ctx) { if(!map_does_not_exist(ctx)){ ContinueFromLoop(ctx); return; } get_next_snapshot(ctx); read_map(ctx, Continue2, ctx); // of next snapshot } void Continue2(void* ctx) { if(error_occured(ctx)){ give_up_chunk(ctx); return; } Loop(ctx); } void ContinueFromLoop(void* ctx) { get_new_chunk(ctx); init_new_chunk(ctx, Continue3, ctx); }

  8. Example(legacy code) cont. void Continue3(void* ctx) { if(error_occured(ctx)){ give_up_chunk(ctx); return; } update_map(ctx, Continue4, ctx); // of top snapshot } void Continue4(void* ctx) { if(error_occured(ctx)){ give_up_chunk(ctx); return; } update_address(ctx); Done(ctx); }

  9. Example START(GET_ADDRESS_FOR_WRITE); ASYNC(read_map); // top snapshot IF(error_occured); GOTO(bail); ENDIF; IF(map_exists); // in top snapshot SYNC(update_address); EXIT; ENDIF; WHILE(map_does_not_exist); SYNC(get_next_snapshot); ASYNC(read_map); // of next snapshot IF(error_occured); GOTO(bail); ENDIF; ENDWHILE; SYNC(get_new_chunk); ASYNC(init_new_chunk); IF(error_occured); GOTO(bail); ENDIF; ASYNC(update_map); // of top snapshot IF(error_occured); GOTO(bail); ENDIF; SYNC(update_address); EXIT; LABEL(bail); SYNC(give_up_chunk); // only if was allocated SYNC(set_error); EXIT; END; EXEC(GET_ADDRESS_FOR_WRITE, ctx, Done);

  10. Example Output ASYNC: read_map Done with async... map_exists(): FALSE map_does_not_exist(): TRUE SYNC: get_next_snapshot ASYNC: read_map Done with async... map_does_not_exist(): TRUE SYNC: get_next_snapshot ASYNC: read_map Done with async... map_does_not_exist(): TRUE SYNC: get_next_snapshot ASYNC: read_map Done with async... map_does_not_exist(): FALSE SYNC: get_new_chunk ASYNC: init_new_chunk Done with async... ASYNC: update_map Done with async... SYNC: update_address Flow terminated

  11. Conclusions • The project is more user friendly and useful than was expected at first. • Writing code with async function has now became easy! • No reason to be afraid of programming with async functions anymore.

More Related