Unisys70 open jobs

Principal Software Engineer - Compiler & System Programming | C/C++

Systems, C++ and performancePosted over 2 months agofrom Unisys's own hiring page

Work type
On-siteBengaluru
Experience
13+ years
Pay
Not listed
Posted
Over 2 months agoOpen 3 months
Before you apply: make your resume fit this job

Skills it mentions

Add your skills to see which ones you have.

Interview questions for this job6 with answers below, on C, C++ and Linux

About the job

What success looks like in this role:

• Leverages subject matter expertise to lead in the design and development of significant and technically challenging efforts across major program / product areas.
• Defines architectural standards, tools and methodologies to ensure technical consistency and quality across the company’s functional applications.
• Identifies, adapts and applies new technologies that can help improve systems overall.
• Collaborates with senior members of development / functional departments across the company to share experiences and knowledge and to identify ways to simplify and integrate products.
• Works with management on the development of Software Engineering governance / performance management processes.
• Helps define, develop and deliver training and education for systems users, Software Engineering colleagues, allied groups and other stakeholders.
• Identifies proprietary intellectual property and recommends patent applications.

#LI-LS1

You will be successful in this role if you have:

  • *Minimum Education Required: Bachelors’ or master’s degree in computer science or equivalent.
  • *Minimum year’s relevant experience required: 13+ years in System software product development experience.
  • *Key Skills:  
  • Hands on experience in C, C++, VC++, Data structures, Microsoft Debugging Tools and working with Windows Crash Dumps.
  • Good experience on tools like Microsoft WindDbg, CDB, Visual studio IDE, Intel One API IDE.
  • Ability to understand, evaluate and propose new features for existing and upcoming products
  • Experience with operating System, system level programming on E-Mode Architecture level. Additional experience with multiple (Instruction Set Architecture) ISA’s different platforms, Windows, Linux etc.
  • Extensive experience working on compiler internals e.g., syntax processing, optimization, code generation techniques, etc.
  • Experience with experience with profiling tools such as Intel VTune, Windows Performance Analyzer, OProfile, Valgrind or prof/gprof.
  • Individual contributor, Leadership & team player, communication skills
  • Exposure to a culture of Devops would be an added advantage

Unisys is proud to be an equal opportunity employer that considers all qualified applicants without regard to age, blood type, caste, citizenship, color, disability, family medical history, family status, ethnicity, gender, gender expression, gender identity, genetic information, marital status, national origin, parental status, pregnancy, race, religion, sex, sexual orientation, transgender status, veteran status or any other category protected by law.

Local employment practices and rights may vary by jurisdiction and are subject to applicable local laws. This commitment includes our efforts to provide for all those who seek to express interest in employment the opportunity to participate without barriers.

 

If you are a US job seeker unable to review the job opportunities herein, or cannot otherwise complete your expression of interest, without additional assistance and would like to discuss a request for reasonable accommodation, please contact our Global Recruiting organization at GlobalRecruiting@unisys.com. US job seekers can find more information about Unisys’ EEO commitment here.

Interested?Principal Software Engineer - Compiler & System Programming | C/C++ at Unisys

Apply on company site (opens in a new tab)

The job ad ends here

Interview questions for this job6 with answers, on C, C++ and Linux

Interview questions for this job

For the skills the ad mentions: C, C++ and Linux.

388 questions
  • What is the difference between a definition and a declaration?C

    A declaration introduces an identifier and describes its type, be it a type, object, or function. A declaration is what the compiler needs to accept references to that identifier. These are declarations:

    extern int bar;
    extern int g(int, int);
    double f(int, double); // extern can be omitted for function declarations
    class foo; // no extern allowed for type declarations
    

    A definition actually instantiates/implements this identifier. It's what the linker needs in order to link references to those entities. These are definitions corresponding to the above declarations:

    int bar;
    int g(int lhs, int rhs) {return lhs*rhs;}
    double f(int i, double d) {return i+d;}
    class foo {};
    

    A definition can be used in the place of a declaration.

    An identifier can be declared as often as you want. Thus, the following is legal in C and C++:

    double f(int, double);
    double f(int, double);
    extern double f(int, double); // the same as the two above
    extern double f(int, double);
    

    However, it must be defined exactly once. If you forget to define something that's been declared and referenced somewhere, then the linker doesn't know what to link references to and complains about a missing symbols. If you define something more than once, then the linker doesn't know which of the definitions to link references to and complains about duplicated symbols.

    Since the debate what is a class declaration vs. a class definition in C++ keeps coming up (in answers and comments to other questions) , I'll paste a quote from the C++ standard here.
    At 3.1/2, C++03 says:

    A declaration is a definition unless it [...] is a class name declaration [...].

    3.1/3 then gives a few examples. Amongst them:

    [Example: [...]
    struct S { int a; int b; }; // defines S, S::a, and S::b [...]
    struct S; // declares S
    —end example
    

    To sum it up: The C++ standard considers struct x; to be a declaration and struct x {}; a definition. (In other words, "forward declaration" a misnomer, since there are no other forms of class declarations in C++.)

    Thanks to litb (Johannes Schaub) who dug out the actual chapter and verse in one of his answers.

    From Stack Overflow: asked by Maciek, answered by sbi (CC BY-SA 3.0)

  • When should static_cast, dynamic_cast, const_cast, and reinterpret_cast be used?C++

    static_cast

    static_cast is the first cast you should attempt to use. It does things like implicit conversions between types (such as int to float, or pointer to void*), and it can also call explicit conversion functions (or implicit ones). In many cases, explicitly stating static_cast isn't necessary, but it's important to note that the T(something) syntax is equivalent to (T)something and should be avoided (more on that later). A T(something, something_else) is safe, however, and guaranteed to call the constructor.

    static_cast can also cast through inheritance hierarchies. It is unnecessary when casting upwards (towards a base class), but when casting downwards it can be used as long as it doesn't cast through virtual inheritance. It does not do checking, however, and it is undefined behavior to static_cast down a hierarchy to a type that isn't actually the type of the object.

    const_cast

    const_cast can be used to remove or add const to a variable; no other C++ cast is capable of removing it (not even reinterpret_cast). It is important to note that modifying a formerly const value is only undefined if the original variable is const; if you use it to take the const off a reference to something that wasn't declared with const, it is safe. This can be useful when overloading member functions based on const, for instance. It can also be used to add const to an object, such as to call a member function overload.

    const_cast also works similarly on volatile, though that's less common.

    dynamic_cast

    dynamic_cast is exclusively used for handling polymorphism. You can cast a pointer or reference to any polymorphic type to any other class type (a polymorphic type has at least one virtual function, declared or inherited). You can use it for more than just casting downwards – you can cast sideways or even up another chain. The dynamic_cast will seek out the desired object and return it if possible. If it can't, it will return nullptr in the case of a pointer, or throw std::bad_cast in the case of a reference.

    dynamic_cast has some limitations, though. It doesn't work if there are multiple objects of the same type in the inheritance hierarchy (the so-called 'dreaded diamond') and you aren't using virtual inheritance. It also can only go through public inheritance - it will always fail to travel through protected or private inheritance. This is rarely an issue, however, as such forms of inheritance are rare.

    reinterpret_cast

    reinterpret_cast is the most dangerous cast, and should be used very sparingly. It turns one type directly into another — such as casting the value from one pointer to another, or storing a pointer in an int, or all sorts of other nasty things. Largely, the only guarantee you get with reinterpret_cast is that normally if you cast the result back to the original type, you will get the exact same value (but not if the intermediate type is smaller than the original type). There are a number of conversions that reinterpret_cast cannot do, too. It's often abused for particularly weird conversions and bit manipulations, like turning a raw data stream into actual data, or storing data in the low bits of a pointer to aligned data. For those cases, see std::bit_cast.

    C-Style Cast and Function-Style Cast

    C-style cast and function-style cast are casts using (type)object or type(object), respectively, and are functionally equivalent. They are defined as the first of the following which succeeds:

    • const_cast
    • static_cast (though ignoring access restrictions)
    • static_cast (see above), then const_cast
    • reinterpret_cast
    • reinterpret_cast, then const_cast

    Read the rest at the sourceFrom Stack Overflow: asked by James Eichele, answered by coppro (CC BY-SA 4.0)

  • What is Linux and difference between UNIX and Linux?Linux

    Linux is an open-source operating system based on the UNIX architecture. It was created by Linus Torvalds in 1991. UNIX, on the other hand, is a family of operating systems that was developed in the late 1960s at Bell Labs. The main differences between UNIX and Linux are:

    • License: UNIX is proprietary, while Linux is open-source and free to use.
    • Development: UNIX is developed by a few organizations (like IBM, Sun Microsystems, and HP), while Linux has a widespread community-driven development process.
    • Portability: Linux is more portable and can be used on a wide range of hardware, whereas UNIX is limited to specific hardware platforms.
    • User base: Linux has a broader user base, including personal computers, servers, and embedded systems, while UNIX is primarily used in enterprise environments.

    From Tech Vault (Apache 2.0)

  • What is the strict aliasing rule?C

    A typical situation where you encounter strict aliasing problems is when overlaying a struct (like a device/network message) onto a buffer of the word size of your system (like a pointer to uint32_ts or uint16_ts). When you overlay a struct onto such a buffer, or a buffer onto such a struct through pointer casting you can easily violate strict aliasing rules.

    So in this kind of setup, if I want to send a message to something I'd have to have two incompatible pointers pointing to the same chunk of memory. I might then naively code something like this:

    #include <stdint.h>
    #include <stdlib.h>
    #include <stdio.h>
    typedef struct Msg {
        uint32_t a;
        uint32_t b;
    } Msg;
    // Sends a buffer over a 16-bit channel
    void SendWords(uint16_t *buf, size_t sz) {
        for(size_t i = 0; i < sz; ++i)
            printf("%.4x ", buf[i]);
        printf("\n");
    }
    int main(void) {
        Msg msg;
        // Send a bunch of messages
        for(int i = 0; i < 10; ++i) {
            msg.a = 0xDEADBEEF;
            msg.b = i;
            SendWords((uint16_t*)&msg, sizeof(msg)/sizeof(uint16_t));
        }
    }
    

    The strict aliasing rule makes this setup illegal: dereferencing a pointer that aliases an object that is not of a compatible type or one of the other types allowed by C 2011 6.5 paragraph 71 is undefined behavior. Unfortunately, you can still code this way, maybe get some warnings, have it compile fine, only to have weird unexpected behavior when you run the code. For example, when I compiled it with gcc -O2 it produced this very unexpected output:

    0000 0000 0000 0000
    0000 0000 0000 0000
    0000 0000 0000 0000
    ...
    

    See this snippet on Compiler Explorer for how GCC and Clang both produce different unintended outputs.

    To see why this behavior is undefined, we have to think about what the strict aliasing rule buys the compiler. Following this rule, the writes to msg cannot alias the reads of buf in SendWords. Consequently, an optimizing compiler can reorder the instructions, so that all assignments to msg happen before or after all the reads from buf in SendWords. In turn, it can then deduce that buf[0], ..., buf[3] can be loaded from memory before the loop is executed, or that only the msg values from the last iteration of the loop need to be calculated. Either way, removing the redundant stores and loads (under this rule) makes the generated code faster. Before strict aliasing was introduced, the compiler had to live in a state of paranoia that the contents of buf could change by any preceding memory stores. So to get an extra performance edge, and assuming most people don't type-pun pointers, the strict aliasing rule was introduced.

    So how do I get around this?

    Read the rest at the sourceFrom Stack Overflow: asked by Benoit, answered by Doug T. (CC BY-SA 4.0)

  • Why are elementwise additions much faster in separate loops than in a combined loop?C++

    Upon further analysis of this, I believe this is (at least partially) caused by the data alignment of the four-pointers. This will cause some level of cache bank/way conflicts.

    If I've guessed correctly on how you are allocating your arrays, they are likely to be aligned to the page line.

    This means that all your accesses in each loop will fall on the same cache way. However, Intel processors have had 8-way L1 cache associativity for a while. But in reality, the performance isn't completely uniform. Accessing 4-ways is still slower than say 2-ways.

    EDIT: It does in fact look like you are allocating all the arrays separately. Usually when such large allocations are requested, the allocator will request fresh pages from the OS. Therefore, there is a high chance that large allocations will appear at the same offset from a page-boundary.

    Here's the test code:

    int main(){
        const int n = 100000;
    #ifdef ALLOCATE_SEPERATE
        double *a1 = (double*)malloc(n * sizeof(double));
        double *b1 = (double*)malloc(n * sizeof(double));
        double *c1 = (double*)malloc(n * sizeof(double));
        double *d1 = (double*)malloc(n * sizeof(double));
    #else
        double *a1 = (double*)malloc(n * sizeof(double) * 4);
        double *b1 = a1 + n;
        double *c1 = b1 + n;
        double *d1 = c1 + n;
    #endif
        //  Zero the data to prevent any chance of denormals.
        memset(a1,0,n * sizeof(double));
        memset(b1,0,n * sizeof(double));
        memset(c1,0,n * sizeof(double));
        memset(d1,0,n * sizeof(double));
        //  Print the addresses
        cout << a1 << endl;
        cout << b1 << endl;
        cout << c1 << endl;
        cout << d1 << endl;
        clock_t start = clock();
        int c = 0;
        while (c++ < 10000){
    #if ONE_LOOP
            for(int j=0;j<n;j++){
                a1[j] += b1[j];
                c1[j] += d1[j];
            }
    #else
            for(int j=0;j<n;j++){
                a1[j] += b1[j];
            }
            for(int j=0;j<n;j++){
                c1[j] += d1[j];
            }
    #endif
        }
        clock_t end = clock();
        cout << "seconds = " << (double)(end - start) / CLOCKS_PER_SEC << endl;
        system("pause");
        return 0;
    }
    

    Benchmark Results:

    EDIT: Results on an actual Core 2 architecture machine:

    2 x Intel Xeon X5482 Harpertown @ 3.2 GHz:

    #define ALLOCATE_SEPERATE
    #define ONE_LOOP
    00600020
    006D0020
    007A0020
    00870020
    seconds = 6.206
    #define ALLOCATE_SEPERATE
    //#define ONE_LOOP
    005E0020
    006B0020
    00780020
    00850020
    seconds = 2.116
    //#define ALLOCATE_SEPERATE
    #define ONE_LOOP
    00570020
    00633520
    006F6A20
    007B9F20
    seconds = 1.894
    //#define ALLOCATE_SEPERATE
    //#define ONE_LOOP
    008C0020
    00983520
    00A46A20
    00B09F20
    seconds = 1.993
    

    Observations:

    • 6.206 seconds with one loop and 2.116 seconds with two loops. This reproduces the OP's results exactly.

    • In the first two tests, the arrays are allocated separately. You'll notice that they all have the same alignment relative to the page.

    • In the second two tests, the arrays are packed together to break that alignment. Here you'll notice both loops are faster. Furthermore, the second (double) loop is now the slower one as you would normally expect.

    As @Stephen Cannon points out in the comments, there is a very likely possibility that this alignment causes false aliasing in the load/store units or the cache. I Googled around for this and found that Intel actually has a hardware counter for partial address aliasing stalls:

    http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/~amplifierxe/pmw_dp/events/partial_address_alias.html

    5 Regions - Explanations

    Region 1:

    This one is easy. The dataset is so small that the performance is dominated by overhead like looping and branching.

    Region 2:

    Read the rest at the sourceFrom Stack Overflow: asked by Johannes Gerer, answered by Mysticial (CC BY-SA 4.0)

  • Can you tell us about a personal achievement at work?Behavioural

    Employers usually base questions on jobs you have done in the past. This gives you the chance to talk about your experience. For instance, they might ask:

    • when have you faced a challenging situation?
    • can you tell us about a personal achievement at work?
    • have you ever taken the initiative?
    • have you ever failed at a task?

    Your answers should reflect the skills the employer wants. Be positive and tailor your examples to the job description.

    If you don't have much work history, you can use examples from outside of work. You can also use examples from volunteering experience.

    Use the  STAR method  to help structure your answers.

    From National Careers Service: interview advice (Open Government Licence v3.0)

Similar jobs

More like this: C++ and systems jobs in Bengaluru (91), Jobs in Bengaluru (10,735) and C++ and systems jobs in India (161)