Changes between Version 21 and Version 22 of AppMultiThread
- Timestamp:
- Dec 30, 2008, 3:31:43 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AppMultiThread
v21 v22 13 13 * You want to reduce the turnaround time of your jobs (either because of human factors, or to reduce server occupancy). 14 14 15 Writing and debugging a multi-threaded app is hard. 16 You may be able to use languages like Titanium or Cilk, 17 or libraries of multi-threaded numerical "kernels". 15 You may be able to use CUDA, or languages like Titanium or Cilk, 16 or libraries of multi-threaded numerical "kernels", to develop a multi-threaded app. 18 17 19 18 == Deploying a multi-threaded app version == … … 31 30 {{{ 32 31 bool app_plan(SCHEDULER_REQUEST& sreq, const char* plan_class, HOST_USAGE& hu) { 33 // clients before 6.1.11 don't understand plan_class34 //35 int v = sreq.core_client_major_version*1000036 + sreq.core_client_minor_version*10037 + sreq.core_client_release;38 if (v < 60111) return false;39 40 32 if (!strcmp(plan_class, "par64")) { 41 33 int ncpus, nthreads; … … 55 47 } 56 48 }}} 57 58 == Client scheduling policy ==59 60 Suppose an app A uses NT(A) threads.61 Ideally, on a host with N CPUs, we want62 NT(A), summed over running apps, to be at least N;63 otherwise CPU time is wasted.64 However, if it's much more than N,65 we increase latency without increasing throughput,66 we may increase synchronization overhead,67 and we may use more RAM than needed.68 69 Given a list of runnable applications (ordered by priority or deadline),70 the CPU scheduler runs applications until the number of threads reaches a limit.71 If the user has specified a limit N on the number of CPUs to use,72 the number of threads cannot exceed N.73 Otherwise, the scheduler stop when the number of threads is >= NCPUS.74