Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Task priority in CICS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
dipakgoyal
Warnings : 1

New User


Joined: 02 Aug 2007
Posts: 18
Location: Kolkata

PostPosted: Mon Oct 13, 2008 7:52 pm    Post subject: Task priority in CICS
Reply with quote

I read in a the site:

http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/com.ibm.cics.ts31.doc/dfht3/dfht34w.htm

that
"
Prioritization is a method of giving specific tasks preference in being dispatched.

Priority is specified by terminal in:

A CEDA TERMINAL definition (TERMPRIORITY)
A transaction in a CEDA TRANSACTION definition (PRIORITY)
A user in the priority field of the user segment of the external security manager (ESM), (OPPRTY).

The overall priority is determined by summing the priorities in all three definitions for any given task, with the maximum priority being 255.

TERMPRIORITY+PRIORITY+OPPRTY <= 255
The value of the PRTYAGE system initialization parameter also influences the dispatching order; for example, PRTYAGE=1000 causes the task's priority to increase by 1 every 1000ms it spends on the ready queue.
"

But CICS supports multitasking. So if all the tasks are running concurrently, how does the concept of "PRIORTIZING THE TASKS" come?

In other words, if a processor can execute only 1 task at a time, then it executes more important task first and then lesser important task. But if all tasks can run simultaneously, what to priortize?
Back to top
View user's profile Send private message

Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Mon Oct 13, 2008 9:37 pm    Post subject:
Reply with quote

Quote:
But CICS supports multitasking. So if all the tasks are running concurrently, how does the concept of "PRIORTIZING THE TASKS" come?


This does not mean they are running truely concurrently. Tasks are
single thread and have control between CICS service calls.
Back to top
View user's profile Send private message
dipakgoyal
Warnings : 1

New User


Joined: 02 Aug 2007
Posts: 18
Location: Kolkata

PostPosted: Tue Oct 14, 2008 11:37 am    Post subject:
Reply with quote

I got the meaning of
" Tasks are single thread "

but I am not clear about
"This does not mean they are running truely concurrently"

Does it mean that if 2 or more tasks uses "CICS service calls", they do it serially?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 14, 2008 11:55 am    Post subject:
Reply with quote

Hello,

Quote:
Does it mean that if 2 or more tasks uses "CICS service calls", they do it serially?
There is some amount of serialization, but overall cics tasks are interleaved, giving the appearance of concurrent execution.
Back to top
View user's profile Send private message
dipakgoyal
Warnings : 1

New User


Joined: 02 Aug 2007
Posts: 18
Location: Kolkata

PostPosted: Tue Oct 14, 2008 12:12 pm    Post subject:
Reply with quote

Thanks Earl and Dick

But my first doubt stand as it was

1. ) We are clear that tasks will be assigned priority. But when is this priority used?

2.) "but overall cics tasks are interleaved, giving the appearance of concurrent execution"

Are you talking about pseudo-coversational approach?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8001
Location: Bellevue, IA

PostPosted: Tue Oct 14, 2008 5:04 pm    Post subject:
Reply with quote

OK, CICS is being given a CPU time slice by z/OS. Since the last CPU time slice, user A on terminal A001 has entered transaction ABCD, user B on terminal B001 has entered transation ZYXW and an interval controlled task has tripped its timer. You have 3 tasks ready to run but only one CPU on which to run them. How does CICS determine which task to start? Answer: the task priority; if ZYXW transaction has a task priority higher than the other two, CICS starts processing the ZYXW transaction. If this transaction finishes and there's still time, or at the next CPU time slice, CICS looks at what work is ready to run and again picks the highest priority task to work on, and so forth.

Which explains both questions -- the interleaving doesn't really have anything to do with pseudo-conversational, which is a way to write the application interaction with the terminal. The interleaving is at a much lower level.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Oct 16, 2008 3:22 am    Post subject: Re: Task priority in CICS
Reply with quote

If you're running an OPEN API environment and your programs are Threadsafe or if you're running DB2 and your programs are Threadsafe, then, this is an example of how two or more tasks can run concurrently, with the QR TCB delegating work to the L9 (OPEN API) and L8 (DB2) Threadsafe TCB's. These tasks may have delegated by the QR a microsecond behind each other, but for all practical purposes, they are executing at the same time (IE: Concurrently). Also, by having these Threadsafe environments, the QR can move along (delegate) at a much quicker pace.

Note that when you define a program in the PPT as Threadsafe, then this is a promise you're giving to CICS that the given program passes all the requirements to be Threadsafe. CICS does not go out of its way to ensure the program is Threadsafe.

Some of our colleagues on this Board may have had some "opportunities" in their shops when a given program was PPT-defined as Threadsafe, but it really wasn't, such as raising a S0C1 on a CLI or MVI instruction (this will leave you with your head scratching) in the transaction dump.

Initially, Threadsafe can be a wild beast to tame. But once the given program has met all of the requirements, you'll find an enormous boost in throughput, especially with DB2/SQL queries.

Please note that this is merely an explanation for Threadsafe concepts and should a shop venture into this area, up front research and stringent testing will be the order of the day as Threadsafe applications and compliance, which will eventually blossom into Threadsafe regions/systems, are not to be taken lightly.

But, the benefits are worth it....

Regards,

Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 0 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us