CA-IDMS Task Management - PowerPoint PPT Presentation

xiomara
ca idms task management l.
Skip this Video
Loading SlideShow in 5 Seconds..
CA-IDMS Task Management PowerPoint Presentation
Download Presentation
CA-IDMS Task Management

play fullscreen
1 / 37
Download Presentation
CA-IDMS Task Management
534 Views
Download Presentation

CA-IDMS Task Management

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. CA-IDMS Task Management Presented by Manfred Hoefer Computer Associates UKIUA ROADSHOW 2004

  2. Agenda • Overview of Online Task Management • Starting Online Tasks • Life Cycle of an Online Task

  3. What Is an Online Task • Identifies the user request for work • Operating system task vs. DC task • Wait driven processing • Interrupt driven processing • Information about request gathered and placed in control blocks: • Program to execute • Priority of request • User security levels

  4. Types of Tasks • Four types of tasks: • System tasks • External user requests • Interactive tasks • Conversational • Pseudo-conversational • Background tasks

  5. System Tasks • MASTER • DBRC • Line driver tasks • Service tasks • Database services • Dictionary run-unit services • Deadlock detection • AdvantageTM CA-IDMS® Database Performance Monitor Option statistics collection • Factotum tasks • Helot tasks

  6. Task Management • Identifies each user request as a task • Keeps track of task status • Determines which task is allowed to process

  7. Starting Online Tasks • Task control overview • Task control data structures • Task control processing routines • Attaching a task • MASTER task processing • Background task overview • Timer-initiated tasks • Startup and Shutdown autotasks • Queue Threshold tasks • Attaching a task from an application • LTE acquisition & task ownership

  8. Task Control Processing • Maintains a list of active tasks • Attaches new tasks to process user requests • Determines task priority and ensures proper security • Passes control to the application program • Terminates a task • Limits task utilization of system resources

  9. Task Control Data Structures • Logical Terminal Table — LTT • Logical Terminal Element — LTE • Task Definition Table header — TDT • Task Definition Element — TDE • Task Table Search Index — TIX • Task Control Area header — TCA • Task Control Element — TCE

  10. Task Control Components • RHDCMSTR • RHDCDBRC • RHDCTSKC • RHDCWAIT • RHDCTSKI • IDMSTMGR

  11. Active Tasks • MAXIMUM TASKS • MAXIMUM ERUS • Number of LINE statements • Plus two for system tasks — MASTER and DBRC • Plus one for each service driver • Plus one for Print task • Active task chain anchored at CSADCEFA

  12. Attaching a Task • #ATTACH macro • Acquire a TCE • Add to dispatch list • Return control • ECB can be used to delay initial dispatch

  13. Processing Interactive Tasks • Terminal control • Terminal ownership • Master’s Ready Queue • Handling all terminals

  14. Processing a Ready Terminal • A dead terminal • A new signon • LTENXTSK • LTEAUTSK • Task code entered on terminal • Previous task abended • No task code or line I/O session • Task code is available • Task is an INPUT task and no input is available • Task is a NOINPUT TASK or input is available • Master processes all ready terminals

  15. A Typical Interactive Processing Cycle • First connection to DC • Line driver posts LTTMSECB • Master sets LTEALIV and attaches factotum • Factotum writes ENTER NEXT TASK CODE and issues read • Factotum task terminates; MASTER waits on PTERECB • Terminal operator enters task code • Master finds TDE and attaches task

  16. A Typical Interactive Processing Cycle (cont'd) • Task terminates with DC RETURN NEXT TASK CODE • LTE is put on MASTER’s queue • Master finds TDE but input isn’t available • Operator hits enter • Line driver posts PTERECB • Master starts new task

  17. Background Task Overview • Timer-initiated tasks • Queue Threshold tasks • Startup and Shutdown autotasks • Application started tasks

  18. Timer-Initiated Background Tasks • Interval Control Element - ICE (#ICEDS) • Three types of timer functions • WAIT • POST • START • TICKER functions

  19. Queue Threshold Tasks • Queue name • TDE of task to start • Number of records currently in the queue • Threshold count • RHDCQUEM attaches task • IDMSTMGR calls RHDCQUEM to post the ECB when queue update is committed

  20. Autotasks • Defined in Sysgen • Startup autotasks attached by Master after Print task • Can preempt any other user tasks • Master attaches shutdown autotasks after other tasks are done • Master attaches LTE autotasks instead of writing ENTER NEXT TASK CODE

  21. Attaching a Task from an Application Program • #ATTACH from assembler program • ATTACH from COBOL or PL/I • Processed like attach by system program • ECB parm can delay initial dispatch

  22. Life Cycle of an Online Task • Attaching a task • Task initialization • Task termination • Making system requests from an application • Entering and re-entering user mode • Limiting a task’s resource utilization

  23. Attaching a Task • Task creation done by RHDCTSKC • Locates the first available TCE/DCE pair • Initializes the DCE and TCE • Assigns task priority • For ERUS tasks, associates a TDE with the task • Allocates a dynamic LTE for background tasks • Calculates task priority and assigns task limits

  24. Attaching a Task (cont'd) • Places the DCE on chain waiting for initial dispatch • Sets a pointer in the TCE to INITLINK or to nucleus entry point • Returns to the program/module which issued the ATTACH

  25. Initial Dispatch • RHDCWAIT • Removes the DCE from the TCANEWT chain • Places the DCE on the active task chain • Initializes Register 9 to point to the new TCE • Initializes Register 13 to point to the beginning of the stack • Calls RHDCTSKI to initiate the task

  26. Task Initialization • RHDCTSKI • Moves long-term resources from LTE to TCE • Moves task limit information from TDERLB to TCERLB • Sets up task initialization statistics • Calls PERFMON to record tasks initialization • Calls Exit 4 • Calls the task’s entry point

  27. Invoking the Initial Program • The INITLINK routine • Allocates an LTE for some background tasks • For ERUS tasks, links to IDMSTASK • For online tasks, uses TCE->TDE->PDE • Issues #LINK to application program

  28. Program Control (RHDCPCTL) • Entered at PCTLLINK • Sets indicators in the TCE • Calls RHDCLODR to locate or load program • Calls RHDCPCBO to perform setup for COBOL • Calls RHDCPPLO to perform setup for PL/I • Calls RHDCLE37 to perform setup for LE • Sets register values in TCERSA • Branches to entry point WAITEPI in RHDCWAIT

  29. Transition to User Mode • WAITEP2I • Sets up TCEPMASK • Sets R8 to point to CSAUMOD1 within RHDCCSA • Branches to GOTOUSER

  30. Entering and Reentering User Mode • GOTOUSER • Page list for storage protected memory • Computes time in system mode • Turns on SVC screening if needed • Copies the user mode registers from TCERSA to the SCA • Sets TCEUSER and SCAUSER • Invokes Advantage CA-IDMS SVC if protect in effect • Branches to CSAUMOD1 or CSAUMOD2

  31. Making System Requests • Application program controls registers and CPU • Entry via CSA for system request • CSA routine branches to WAITEP2 • Set the PSW program mask • Saves the applications program’s AMODE • Copies user mode registers • Updates R14 in the RSA

  32. WAITEP2 processing • Set the PSW program mask • Save the application program’s AMODE • Save user mode registers • Calculates CPU time in user mode • Turns off SCAUSR • Calls WAITEP5 (security check) • Writes a trace entry to log if USER TRACE • Calls RHDCLIMT • Calls appropriate processing routine • Returns to user mode via GOTOUSER

  33. Terminating a Task • DC RETURN or #RETURN • PCTLRTN routine • Processes any parameters specified on the return to: • Set LTENXTSK • Set LTESRPGM • Set LTERSINT • Set LTENTPC • Release the application program (#DELETE) • Pass control to entry point TSKIEP2 within RHDCTSKI • System task does a #RTN

  34. Task Termination Processing • TSKIEP2 • Call RHDCFLTR for dynamic LTE • Call IDMSTMGR to perform task end events • Set up task statistics • Call Exit 5 • Call PERFMON to record task end event • Get ERUS statistics • Write statistics to the log

  35. Task Termination Processing (cont'd) • Call Exit 6 • Move long term resources from TCE anchors to LTE anchors • Set LTEMSTR • Put LTE on Master’s ready queue • If suspended ERUS LTE, post ESEECB to wake up DBRC • If dynamic LTE without LTENXTSK, free the LTE • Pass control to WAITEP1R in RHDCWAIT

  36. Detaching a Task • WAITEP1R • Remove DCE from the active task chain • Place TCE/DCE pair on the free task chain • Post TCAECB • Branch to DISPATCH to find another task to dispatch

  37. Session Summary A Few Words to Review • DC/UCF functions like an operating system • Master task manages interactive terminals • Non-interactive tasks can be created • Application has control of system while in user mode (subject to security restrictions)