View previous topic :: View next topic
|
Author |
Message |
rakesh_mishra18
New User
Joined: 15 May 2006 Posts: 23 Location: Jamshedpur
|
|
|
|
How word size is defined in Mainframe. Is it when defining the parameters during installation of OS. Here the context is, we are getting a new Z10 machine and as per our design 'C', COBOL, MQ... everything should have 64 bit word size otherwise performance may not be optimum. I am not sure how we can maintain the whole environment to have same bit of 64 and not a mix of 32 and 64. If it is at OS level where we can configure or at hardware level then there should not be any issue I guess.I am not sure if the question is clear enough.
Rgds,
Rakesh |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
4 bytes/32 bits. Unless something has changed very recently, word size is a hardware feature/function, not an operating system parameter. . .
Quote: |
Is it when defining the parameters during installation of OS. |
No.
Quote: |
I am not sure if the question is clear enough. |
I believe your question is clear enough. I also believe there is confusion as to what is a "word" and what is "addressing".
Quote: |
everything should have 64 bit word size otherwise performance may not be optimum |
Why would you believe this? This will not be your main performance consideration - if it is a concern at all.
Please take the above with a "grain of salt" . . . It is from years of the "old" way and may need to be updated quite soon. . . |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The longer i think about this and after some searching on the IBM zSeries site i believe we are closer than i originally believed. . .
Maybe someone has a link to some concise description of 64-bit hardware and potential changes to the internal instructions and control blocks. . . |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
... everything should have 64 bit word size otherwise performance may not be optimum. |
where did You read that....
the MF addressing scheme is BYTE oriented, NOT WORD ORIENTED
the instruction timing depends also on the number of bits processed
( moving/processing 64 bits will always take longer than moving/processing 32 bits ) |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Rakesh,
As Dick stated, you may have "word size" confused w/"addressing". There is the concept of 32 (or 64) bit addressing, and if I'm not mistaken (it's been a long time ) it sets the limit on the maximum number of bytes that can be addressed in a CPU of a given architecture. For 64 bit CPU's it's 9223372036854775807; for 32 it's 2147483647 (if I'm not mistaken, the high order bit is not available for the calculation).
There are. of course, other limits (customer need/desire, for example) that can affect the size of the CPU at your site , but 64 bits sets the max storage size for the archetecture. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
You mention z10 and COBOL specifically. From the COBOL Programming Guide (link at the top of the page) section 1.2.6:
Quote: |
Enterprise COBOL does not directly exploit the 64-bit virtual addressing capability of z/OS; however, COBOL applications running in 31-bit or 24-bit addressing mode are fully supported on 64-bit z/OS systems. |
IIRC, a z10 is 64 bit and cannot be otherwise. However, the compilers and utilities may or may not take advantage of it. And I've never heard of a case where performance would depend on taking advantage of 64 bit addressing. I suspect somebody in your shop is confused about things -- perhaps some additional discussions with your mainframe vendor would be helpful. |
|
Back to top |
|
|
rakesh_mishra18
New User
Joined: 15 May 2006 Posts: 23 Location: Jamshedpur
|
|
|
|
Thanks for clarifications. I am in sync with most of the thoughts.
1. We are not confused with Word and addressing.
2. On performance I will put the question in a diffrent perspective -
We are converting the code from Unisys ALGOL to IBM C. Unisys ALGOL Word size is 48 bit. If we use 32 bit word size in IBM then to replace one word in Unisys we require two word in IBM and in case of 64 bit it will be one to one mapping.
My team has written a stub program in IBM C to validate the performance for using different data types of SIGNED LONG LONG, LONG and SHORT.
We find that, for 32 bit compilation, LONG is best / optimal and
for 64 bit, SIGNED LONG LONG is best / optimal.
In both cases SHORT was taking more CPU
So now we would like to check if we can propose 64 bit for all components , because there may be impact if C alone is using 64 bits and is calling COBOL / DB2 / MQ, which are using 32 bits.
I think here the question is whether Z10 machine comes with 64 bit for all the components otherwise there may be impact as per our analysis. I hope i am not confusing others as this is not an easy application programming question.
Thanks,
Rakesh |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
From the z/OS C/C++ Programming Guide:
Quote: |
4.3.3.1 LP64 application performance and program size
You can use the 64-bit address space to dramatically improve the performance of applications that manipulate large amounts of data, whether the data is be created within the application or obtained from files. Generally, the performance gain comes from the fact that the 64-bit application can contain the data in its 64-bit address space (either created in data structures or mapped into memory), when it would not have fit into a 32-bit address space. The data would need to be multiple GBs in size or larger to show this benefit.
If the same source code is used to create a 32-bit and a 64-bit application, the 64-bit application will typically be larger than the 32-bit application. The 64-bit application is unlikely to run faster than the 32-bit application unless it makes use of the larger 64-bit addressability. Because most C programs are pointer-intensive, a 64-bit application can be close to twice as large as a 32-bit application, depending on how many global pointers and longs are declared. A 64-bit C++ program uses almost twice the data as a 32-bit C++ program, due to the large number of pointers the compiler uses to implement virtual function tables, objects, templates, and so on. That is why the appropriate choice is to create a 32-bit application, unless 64-bit addressability is required by the application or can be used to dramatically improve its performance.
Attention:
Even though the address space is increased significantly, the amount of hardware physical memory is still limited by your installation. Data that is not immediately required by the program is subject to system paging. Programs that use large data tables therefore require a large amount of paging space. For example, if a program requires 3 GB of address space, the system must have 3 GB of paging space. 64-bit applications might require paging I/O tuning to accommodate the large data handling benefit. |
As my earlier post stated, COBOL for one absolutely does not make use of 64 bit mode. So the answer to the question "whether Z10 machine comes with 64 bit for all the components" is an unequivocal NO. |
|
Back to top |
|
|
|