Software Engineer, Runtime & C++ Middleware
Systems, C++ and performancePosted over 2 months agofrom Plus.ai's own hiring page
- Work type
- HybridSan Francisco Bay Area
- Experience
- Not stated
- Pay
- $120k–200k a year
- Posted
- Over 2 months agoOpen over a year
Skills it mentions
Add your skills to see which ones you have.
About the job
Responsibilities:
- Design and optimize low-latency interprocess communication and data flow monitoring.
- Develop high-performance event logging and structured telemetry.
- Implement safety-enhanced memory allocators and efficient memory provisioning policies.
- Build lock-free data structures and algorithms to support real-time system requirements.
- Work on network communication and coherency protocols.
- Develop on-the-fly component health monitoring and rapid response mechanisms for critical events.
- Manage on-vehicle configurations and system state validation.
- Optimize low-level OS interactions and fine-tune system performance.
- Ensure that your work is performed in accordance with the company’s Quality Management System (QMS) requirements and contribute to continuous improvement efforts.
- Ensure team compliance with QMS, monitor quality, and drive process improvements.
Required Skills:
- BS in Computer Science, Electrical Engineering, or related field.
- Solid hands-on coding experience using C++14(or later)
- Strong understanding of Linux development tools, including build systems, compilers, debuggers, and performance analyzers.
- Excellent written and verbal communication skills.
- Proactive problem-solving mindset: ability to identify, propose, and implement solutions.
Preferred Skills:
- Experience in writing, debugging, and profiling multithreaded C++ applications.
- Familiarity with robotics-related libraries such as ROS.
- Knowledge of real-time OS, database internals, network programming, GPGPU, or robotics.
Salary Range:
- $120,000 - $200,000 a year
Interested?Software Engineer, Runtime & C++ Middleware at Plus.ai
Apply on company site (opens in a new tab)The job ad ends here
Interview questions for this job6 with answers, on C++ and Linux
Interview questions for this job
For the skills the ad mentions: C++ and Linux.
What is The Rule of Three?C++
Introduction
C++ treats variables of user-defined types with value semantics. This means that objects are implicitly copied in various contexts, and we should understand what "copying an object" actually means.
Let us consider a simple example:
class person { std::string name; int age; public: person(const std::string& name, int age) : name(name), age(age) { } }; int main() { person a("Bjarne Stroustrup", 60); person b(a); // What happens here? b = a; // And here? }(If you are puzzled by the
name(name), age(age)part, this is called a member initializer list.)Special member functions
What does it mean to copy a
personobject? Themainfunction shows two distinct copying scenarios. The initializationperson b(a);is performed by the copy constructor. Its job is to construct a fresh object based on the state of an existing object. The assignmentb = ais performed by the copy assignment operator. Its job is generally a little more complicated because the target object is already in some valid state that needs to be dealt with.Since we declared neither the copy constructor nor the assignment operator (nor the destructor) ourselves, these are implicitly defined for us. Quote from the standard:
The [...] copy constructor and copy assignment operator, [...] and destructor are special member functions. [ Note: The implementation will implicitly declare these member functions for some class types when the program does not explicitly declare them. The implementation will implicitly define them if they are used. [...] end note ] [n3126.pdf section 12 §1]
By default, copying an object means copying its members:
The implicitly-defined copy constructor for a non-union class X performs a memberwise copy of its subobjects. [n3126.pdf section 12.8 §16]
The implicitly-defined copy assignment operator for a non-union class X performs memberwise copy assignment of its subobjects. [n3126.pdf section 12.8 §30]
Implicit definitions
The implicitly-defined special member functions for
personlook like this:// 1. copy constructor person(const person& that) : name(that.name), age(that.age) { } // 2. copy assignment operator person& operator=(const person& that) { name = that.name; age = that.age; return *this; } // 3. destructor ~person() { }Memberwise copying is exactly what we want in this case:
nameandageare copied, so we get a self-contained, independentpersonobject. The implicitly-defined destructor is always empty. This is also fine in this case since we did not acquire any resources in the constructor. The members' destructors are implicitly called after thepersondestructor is finished:After executing the body of the destructor and destroying any automatic objects allocated within the body, a destructor for class X calls the destructors for X's direct [...] members [n3126.pdf 12.4 §6]
Managing resources
So when should we declare those special member functions explicitly? When our class manages a resource, that is, when an object of the class is responsible for that resource. That usually means the resource is acquired in the constructor (or passed into the constructor) and released in the destructor.
Let us go back in time to pre-standard C++. There was no such thing as
std::string, and programmers were in love with pointers. Thepersonclass might have looked like this:Read the rest at the sourceFrom Stack Overflow: asked by fredoverflow, answered by fredoverflow (CC BY-SA 4.0)
What is
grepcommand? How to match multiple strings in the same line?LinuxBasicThe
greputilities are a family of Unix tools, includingegrepandfgrep.grepsearches file patterns. If you are looking for a specific pattern in the output of another command,grephighlights the relevant lines. Use this grep command for searching log files, specific processes, and more.For match multiple strings:
grep -E "string1|string2" filenameor
grep -e "string1" -e "string2" filenameUseful resources:
From Test your Sysadmin Skills (MIT)
When should static_cast, dynamic_cast, const_cast, and reinterpret_cast be used?C++
static_caststatic_castis the first cast you should attempt to use. It does things like implicit conversions between types (such asinttofloat, or pointer tovoid*), and it can also call explicit conversion functions (or implicit ones). In many cases, explicitly statingstatic_castisn't necessary, but it's important to note that theT(something)syntax is equivalent to(T)somethingand should be avoided (more on that later). AT(something, something_else)is safe, however, and guaranteed to call the constructor.static_castcan 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 throughvirtualinheritance. It does not do checking, however, and it is undefined behavior tostatic_castdown a hierarchy to a type that isn't actually the type of the object.const_castconst_castcan be used to remove or addconstto a variable; no other C++ cast is capable of removing it (not evenreinterpret_cast). It is important to note that modifying a formerlyconstvalue is only undefined if the original variable isconst; if you use it to take theconstoff a reference to something that wasn't declared withconst, it is safe. This can be useful when overloading member functions based onconst, for instance. It can also be used to addconstto an object, such as to call a member function overload.const_castalso works similarly onvolatile, though that's less common.dynamic_castdynamic_castis 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. Thedynamic_castwill seek out the desired object and return it if possible. If it can't, it will returnnullptrin the case of a pointer, or throwstd::bad_castin the case of a reference.dynamic_casthas 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 usingvirtualinheritance. It also can only go through public inheritance - it will always fail to travel throughprotectedorprivateinheritance. This is rarely an issue, however, as such forms of inheritance are rare.reinterpret_castreinterpret_castis 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 anint, or all sorts of other nasty things. Largely, the only guarantee you get withreinterpret_castis 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 thatreinterpret_castcannot 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, seestd::bit_cast.C-Style Cast and Function-Style Cast
C-style cast and function-style cast are casts using
(type)objectortype(object), respectively, and are functionally equivalent. They are defined as the first of the following which succeeds:const_caststatic_cast(though ignoring access restrictions)static_cast(see above), thenconst_castreinterpret_castreinterpret_cast, thenconst_cast
Read the rest at the sourceFrom Stack Overflow: asked by James Eichele, answered by coppro (CC BY-SA 4.0)
Every command fails with
command not found. How to trace the source of the error and resolve it?LinuxBasicIt looks that at one point or another are overwriting the default
PATHenvironment variable. The type of errors you have, indicates thatPATHdoes not contain e.g./bin, where the commands (including bash) reside.One way to begin debugging your bash script or command would be to start a subshell with the
-xoption:bash --login -xThis will show you every command, and its arguments, which is executed when starting that shell.
Also very helpful is show
PATHvariable values:echo $PATHIf you run this:
PATH=/bin:/sbin:/usr/bin:/usr/sbinmost commands should start working - and then you can edit
~/.bash_profileinstead of~/.bashrcand fix whatever is resettingPATHthere. DefaultPATHvariable values for root and other users is in/etc/profilefile.Useful resource:
From Test your Sysadmin Skills (MIT)
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.993Observations:
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:
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)
Why do you want to work for us?Behavioural
Employers want to see that you have a genuine interest in working for them by asking questions like:
- what do you know about our company?
- why do you think you're a good fit for our company?
- why do you want to work for us?
To prepare for questions about the employer, you need to research the company. You should look at their website and 'about us' pages to find out more about their products, services and values.
Show what you've learned about the company throughout the interview.From National Careers Service: interview advice (Open Government Licence v3.0)
Similar jobs
- Software Engineer, Network (C++)SpaceX, San Francisco Bay Area, Seattle, on-siteYesterday
- Senior Software Engineer (C++) - Sensor PipelinesLatitude AI, Remote, San Francisco Bay Area +12 weeks ago
- Staff Software Engineer - Compiler & Spark RuntimeSnowflake, Remote, San Francisco Bay Area +13 weeks ago
- Software Engineer, C++ (Onboard Platform)Applied Intuition, San Francisco Bay Area, on-site4 weeks ago
More like this: C++ and systems jobs in San Francisco Bay Area (50), Jobs in San Francisco Bay Area (9,193) and C++ and systems jobs in the USA (107)



