About Question enthuware.ocpjp.v7.2.1323 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
The_Nick
Posts: 132
Joined: Thu May 16, 2013 9:23 am
Contact:

About Question enthuware.ocpjp.v7.2.1323 :

Post by The_Nick »

Hi everybody,
From the explanation of this question I would like to clarify:
Although MIN_PRIORITY and MAX_PRIORITY are 1 and 10 respectively, you cannot assume this.
Why we cannot assume it?

Thanks in advance.

The_Nick.

admin
Site Admin
Posts: 10398
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1323 :

Post by admin »

Ideally, you should not work with the actual values because they may change. It is always better to use the name of the constant.

Further, it really depends on the OS. If you set a priority to say 10, but if the OS's max thread priority is only 5, then there may be a problem. So it is better to set the priority using MAX_PRIORITY instead of 10.

The_Nick
Posts: 132
Joined: Thu May 16, 2013 9:23 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1323 :

Post by The_Nick »

If the values of MAX and MIN_PRIORITY can vary depending on the operating system. Does it mean that it's mapped directly to the OS scheduler? if that is true, does it exist a concept of priority in OS schedulers?
Thanks in advance.
The_Nick.

admin
Site Admin
Posts: 10398
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1323 :

Post by admin »

Yes, OSes do have a concept of priority but they may use it differently.

HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests