Changes between Version 1 and Version 2 of SchedMatch

Show
Ignore:
Author:
davea (IP: 128.32.18.181)
Timestamp:
02/29/08 14:44:43 (2 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SchedMatch

    v1 v2  
    3030 
    3131functions: 
    32         fast_filter():: feasibility checks that can be done with no DB access 
    33         slow_filter():: feasibility checks that need DB access 
     32 job_set_feasible(set):: checks if a set of jobs is feasible (no DB access) 
     33 * disk usage 
     34 * deadline check (EDF sim or crude) 
     35 * one result per user/host (no DB) 
    3436 
    35 When we scan a slot, the possibilities are: 
    36  * slot is empty 
    37  * slot is locked by another scheduler 
    38  * job fails fast filter 
    39  * job fails slow filter 
    40  * none of the above 
     37 job_feasible_fast(j):: feasibility checks that can be done with no DB access 
     38 * WU committed to different platform (no DB check) 
     39 * app filtering 
     40 * memory usage 
     41 
     42 job_feasible_slow(j):: feasibility checks that need DB access 
     43 * one result per user or host per WU (look in DB) 
     44 * WU committed to different platform (look in DB) 
    4145 
    4246Parameters: 
    43         N:: scan at least this many slots 
    44                 (if scan N slots and have enough jobs to send, stop) 
    45         M:: scan at most this many slots 
    46                 (even if don't have enough jobs to send yet) 
    47         L:: if scan this many locked slots, print warning msg 
    48                 (should increase shmem size) 
     47 N:: scan at least this many slots (if scan N slots and have enough jobs to send, stop) 
     48 M:: scan at most this many slots (even if don't have enough jobs to send yet) 
     49 L:: if scan this many locked slots, print warning msg (should increase shmem size) 
    4950 
    5051logic: 
    5657slots_locked = 0 
    5758loop 
    58         i = i+1 % array_size 
    59         slots_scanned++ 
    60         if slots_scanned > M 
    61                 break 
    62         if shmem[i] is empty 
    63                 continue 
    64         if shmem[i] is locked 
    65                 slots_locked++ 
    66                 continue 
    67         j = shmem[i] 
    68         if !fast_filter(j) continue; 
    69         v = v(h, j) 
    70         if v > lowest score in x 
    71                 lock j 
    72                 release semaphore 
    73                 if !slow_filter(j) 
    74                         acquire semaphore 
    75                         unlock j 
    76                         continue 
    77                 acquire semaphore 
    78                 if x satisfies client's work request 
    79                         unlock and remove lowest-score element of x 
    80                 add j to x 
    81         if x satisfies client's work request and slots_scanned >= N 
    82                 break; 
     59    i = i+1 % array_size 
     60    slots_scanned++ 
     61    if slots_scanned > M 
     62        break 
     63    if shmem[i] is empty 
     64        continue 
     65    if shmem[i] is locked 
     66        slots_locked++ 
     67        continue 
     68    j = shmem[i] 
     69    if !job_feasible_fast(j) continue; 
     70    v = v(h, j) 
     71    if v <= lowest score in x 
     72        continue 
     73    S = jobs in x with value >= v 
     74    if !job_set_feasible(S+j) 
     75        continue 
     76    lock j 
     77    release semaphore 
     78    if !job_feasible_slow(j) 
     79        acquire semaphore 
     80        unlock j 
     81        continue 
     82    acquire semaphore 
     83    add j to x 
     84    while (x minus lowest-val element) satisfies work request 
     85        remove lowest-val element of x 
     86    while !job_set_feasible(x) 
     87        remove lowest-value element of x 
     88    if x satisfies work request and slots_scanned >= N 
     89        break; 
    8390for each job j in x 
    84        mark slot j as empty 
     91    mark slot j as empty 
    8592release semaphore 
    8693if slots_locked > L 
    87        print "need bigger array" message 
     94    print "need bigger array" message 
    8895}}} 

If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.