@@ -44,8 +44,8 @@ behalf of jobs.
4444A scheduler implementation registers the generic service name ``sched ``
4545and provides several well known service methods. The job manager requests
4646resources from the scheduler with a ``sched.alloc `` request when a job enters
47- SCHED state. It releases resources with a ``sched.free `` request when a job
48- enters CLEANUP state.
47+ SCHED state. It releases resources with one or more ``sched.free `` requests
48+ after a job enters CLEANUP state.
4949
5050The simplest imaginable scheduler satisfies ``sched.alloc `` requests in order
5151until it is out of resources, then blocks until ``sched.free `` requests
@@ -569,16 +569,22 @@ The request MAY fail, for example if:
569569Free
570570====
571571
572- The job manager SHALL send a ``sched.free `` request when a job that is
573- holding resources enters CLEANUP state . The request payload consists of
572+ The job manager SHALL send one or more ``sched.free `` requests to release
573+ allocated resources to the scheduler . The request payload consists of
574574a JSON object with the following REQUIRED keys:
575575
576576id
577577 (integer) job ID
578578
579579R
580580 (object) RFC 20 resource set from which the ``scheduling `` key MAY be
581- omitted.
581+ omitted. This resource set MAY be a subset of the original allocation.
582+
583+ and the following OPTIONAL key:
584+
585+ final
586+ (boolean) If present and true, this free request is the final one for the
587+ job. If absent or false, more free requests are forthcoming for the job.
582588
583589Example:
584590
@@ -597,11 +603,16 @@ Example:
597603 "expiration" : 1710076122
598604 }
599605 }
606+ "final" :true
600607 }
601608
602609
603- Upon receipt of the ``sched.free `` request, the scheduler SHOULD mark the
604- job's resources as available for reuse.
610+ Upon receipt of a ``sched.free `` request, the scheduler SHOULD mark the
611+ designated resources as available for reuse.
612+
613+ When a job's resources are released with multiple ``sched.free `` requests,
614+ the scheduler MAY assume that the resources associated with a given rank
615+ in the original allocation are never split over multiple free requests.
605616
606617There is no response.
607618
0 commit comments