On 30/04/2014 7:05 AM, Mark Post wrote:
On 4/29/2014 at 11:13 AM, Scott Ford <[email protected]> wrote:
Its surprising that IBM hasn't thought about using C in exits , like RACF  or
other components.

Considering Linux has been writing their Kernel in it for a few years.  Not
bashing IBM, curious why they haven't embraced C in the systems arena. I see
it in some of the system type tools.
Linux was initially written in C for whatever reason (most likely ease of 
coding and availability of a compiler), initially.  As time went on, it stayed 
that way for relatively easy portability to other architectures.  What having 
an entire operating system written in C does _not_ do, however, it wring the 
last bit of performance out of a particular hardware platform.  It's one of the 
reasons why z/OS and z/VM were able to perform so well on systems like the 9672 
or z800/z900, but Linux performance pretty much stank.

C has been the lingua franca from writing operating systems since Unix in 1973. That's a long time ago and it's certainly lasted the test of time. It runs the operating systems from high end enterprise servers down to mobile phones or embedded devices. It's probably the best tool for the job even though the language is seriously flawed. The sheer volume of highly skilled programmers is a good enough reason to choose it. BTW, isn't the majority of z/OS written in PL/X, in which case what's the big difference between the code generated by PL/X and C? Surely it comes down the quality of the compiler back-end. I remember reading that the original ports of gcc and glibc to S390 were sub-optimal. I very much doubt if that's the case now.

 From my perspective, it was Linux on System z that really pointed out how slow 
IBM mainframes were in raw CPU power (about 200MHz) compared to other 
architectures such as Power and Intel/AMD.  Over time that situation has 
changed radically, of course, and now System z has the fastest CPU cycle times 
in the industry.  But I doubt that would have happened as quickly as it did, if 
it weren't for IBM's desire to continue to sell hardware to run Linux on System 
z.

Isn't that still the case for some workloads such as HPC? z is not much of a number cruncher compared to x86 and Power which have SIMD execution units.

And, if you look closely, sections of code in the kernel that are considered 
critical to overall system performance _are_ written in assembler for every 
architecture.  I would say that given the fact that IBM isn't interested in 
porting z/OS (including RACF and the like) to other hardware platforms, they'd 
be insane to start coding large chunks of it in C.

Last time I looked syscalls.S, which is the analog of the z/OS SVC FLIH was written in assembler as is some boot loader code. That makes sense because the C runtime depends on them. The atomics stuff is also mostly assembler because you certainly don't want an optimizer re-arranging your code path for low-level locking primitives. Other then that the other performance critical modules such as interrupts, memory management, paging and the scheduler are all written in C.


Mark Post

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to