GRS is a JEM teh BEE component responsible for enabling fair access to serially reusable computing resources, such as datasets or virtual resources, such as lists, queues, and control blocks. Jobs (or programs using java API) can request:
- exclusive access to a resource (which means that job and all subsequent requesting jobs are blocked until that job is given access to the resource), usually requested when a job (at step level) needs to update the resource
- shared access (which means that multiple jobs can be given access to the resource), usually requested when a job only needs to query the state of the resource
GRS manages all requests in FIFO (first in/first out) order.
All resources are defined and locked before to call program which needs resources, (at job or step or task level). All files are candidated out-of-the-box for locking, by a specific syntax to use in the JCL language (all OOTB JCL languages implement this feature, by data descriptors).
GRS works in READ (shared access) and/or WRITE (exclusive access) modes, so the following table explains how JEM manages different dispositions on files translating in only 2 types (read and write):
|Data description disposition||GRS lock|
When a JEM node crashes, the coordinator will unlock all resources previously blocked by a job which was running in JEM node.
Read here more details.