Skip to content

Commit

Permalink
vine: priority queue implementation (#3919)
Browse files Browse the repository at this point in the history
* priority queue data structure

* comment fix

* comment operation complexity

* add apis

* lint

* priority_queue_update_priority

* lint fix

* add blank line at the end

* update Makefile

* type issue

* double priority

* lint issue

* test

* priority_queue_implementation

* lint

* don't change tasks' priorities

* lint

* remove check cores

* don't change test

* don't change code of workqueue

* use idx to access tasks

* lint

* syntax fix

* syntax fix

* add proper brackets

* comments

* step_cursor -> static_cursor

* scheduling_cursor -> rotate_cursor

* rename macrons

* comment

* reset rotate cursor as appropriate

* lint

* add priority_queue_push_upward

* split send_one_task

* split send_one_task

* replace consider_task

* directly iterate over the ready tasks

* remove task_state_count

* test script for pq

* comments for task scheduling

* test script

* add priority_queue_test to Makefile

* lint

* lint

* remove push upward

* test

* index starts from 0

* lint

* base iterate

---------

Co-authored-by: root <[email protected]>
  • Loading branch information
JinZhou5042 and HarukaMa authored Nov 18, 2024
1 parent 59a7787 commit ba16439
Show file tree
Hide file tree
Showing 10 changed files with 965 additions and 131 deletions.
5 changes: 4 additions & 1 deletion dttools/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ SOURCES = \
pattern.c \
ppoll_compat.c \
preadwrite.c \
priority_queue.c \
priority_queue_test.c \
process.c \
random.c \
rmonitor.c \
Expand Down Expand Up @@ -161,6 +163,7 @@ HEADERS_PUBLIC = \
md5.h \
macros.h \
path.h \
priority_queue.h \
rmonitor_poll.h \
rmsummary.h \
stringtools.h \
Expand Down Expand Up @@ -190,7 +193,7 @@ PROGRAMS = $(MOST_PROGRAMS) catalog_query

SCRIPTS = cctools_gpu_autodetect
TARGETS = $(LIBRARIES) $(PRELOAD_LIBRARIES) $(PROGRAMS) $(TEST_PROGRAMS)
TEST_PROGRAMS = auth_test disk_alloc_test jx_test microbench multirun jx_count_obj_test jx_canonicalize_test jx_merge_test hash_table_offset_test hash_table_fromkey_test histogram_test category_test jx_binary_test bucketing_base_test bucketing_manager_test
TEST_PROGRAMS = auth_test disk_alloc_test jx_test microbench multirun jx_count_obj_test jx_canonicalize_test jx_merge_test hash_table_offset_test hash_table_fromkey_test histogram_test category_test jx_binary_test bucketing_base_test bucketing_manager_test priority_queue_test

all: $(TARGETS) catalog_query

Expand Down
Loading

0 comments on commit ba16439

Please sign in to comment.