The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
That's why I said de facto standard, since ANSI C standard does not deal with implementation details. In your case we're talking about calling convection and for each platform there are several well known and understood convections (almost as if they are standardized). Any decent compiler support different calling conventions and allows you to specify it for your functions, so interoperability is not a problem. This is not the case with C++ where we have things like vtables, pointer to member, name mangling...
I prefer C because the code is really clean an you know what it will compile into. But tt could be done in C++. The question is - do you also want to expose system services in object oriented manner or simply write a kernel using it?
Your everyday micro-kernel does following:
1) Startup code is usually written in assembler. It manages interrupts, initializes stack, vectors and BSS/DATA segments for C/C++ code, and typically ends by calling your _main function), minor changes are required here (I guess there are some C++ code startup tasks here).
2) Memory management. Operator new would have to be overloaded.
3) Task (thread) management. Maintaining thread queues (running, sleeping, waiting, suspended, etc.), basic context switching logic, algorithm to select next thread to run, and algorithms to support sync. events (this is commonly just moving threads from one queue to another).
4) IPC mechanisms. You could expose the inner kernel logic as some sort of interfaces, similar to COM vtables. And proxy each function so that it "simulates" OS mode call before executing (depending on hardware).
Coming from the embedded world where C is the 800 lb gorilla, the reason for this is memory management, or lack of it. Building an OS has much in common with embedded, since it's a "bare iron" implementation. That means there no service to allocate and free memory or manage stacks and heaps. That's what the OS does.
More critical is the tradeoff between deterministic and probablistic behavior. Real time response requries deterministic response times. When an interrupt occurs it absolutely, positively has to be handled right now (want your brakes and steering to wait for the heap to be consolidated?). Inject garbage collection and heap allocation overhead, respone time become probabilistic...it may be ready on time, but no guarantee.
We think of an OS kernel in terms of threads, scheduling, maybe a filesystem, but that's what's exposed to the user. It's the internals, finding the minimal path to schedule the next task (or tasks plural for multi-core), efficiently passing inter-process messages, and optimizing I/O operations for parallel, asynchronous operation. Often the code is closely tied to the hardware, and that's where C outperforms anyting but assembler.
There's a micro-kernel for essential services, things like task scheduling and memory management. Essentially that's a standalone program since it's the lowest layer. Built on top of that are tasks that can be scheduled to implement the rest of the services. Task is a way to encapsulate a service. That has some security benefits by localizing references, it only runs as needed, can be swapped in a virtual system if not needed, and run multiple execution paths through the same code, important if there are several execution units (multi-core CPUs).
So the upper layers, close to the end user, are usually process based, though there are some exceptions when you get to embedded RTOS design. Response time is everything in an RTOS, which is why they exist alongside a traditional OS like LInux or Windows. In an RTOS there may not be enough resources to work through multiple layers. Remember, we're talking about a microwave oven or a sprinkler controller, not an i7 and 16GB RAM. A low level RTOS does look more like a library of method calls to a small set of services.
The rules for this forum state: "For lazing about and discussing anything in a software developer's life that takes your fancy except programming questions."This topic definitely affects a software developer's life.
In 2014, the U.S. approved more than 370,000 H-1B applications. The flood of cheap foreign workers is killing compensation for software developers. In the DC region, I am seeing rates from the early 90's. In the 90's, rates were easily $40-80/hr. I think it is worse in the Seattle area. If we have a tech worker shortage, why are we at $40-80/hr 25 years later ? I want to know which candidate will shut this down ?
...thanks primarily to the ability to pay their imported workers on H-1B visas between 30 percent and 50 percent less than the prevailing American wage rate for that job.
...it's no surprise to discover that politics and business are familiar bedfellows, ...the list of the top 10 companies who apply for H-1B visas. In 2014, while six were Indian ... the rest were all American. Deloitte, IBM, Accenture, and Microsoft made up the remainder of the top 10, while Ernst & Young and Google sneaked into 11th and 12th places
There is no qualification of what kind of candidate in the original question. Senate and House Representatives can introduce legislation to shut the program down, and even labor representatives might have an influence enough to do so. I see a lot of complaining here about this post, but I see WAY more about programming, and not a peep is emitted from any of you. Stop being such hypocrites.
It's a Soapbox issue - it's political, which is probably why it got moved: it obeys one rule but breaks others.
I'd suggest that you don't push the rules too much to drive your agenda here, you will annoy people and they will almost certainly vote to close your account as a result.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
It is not a programming question and it is not "political" -- it does not advocate any candidate or party. This affects the wages of all US IT workers - which would seem to impact a "software developer's life". The Soapbox is where this goes to die. hmmm... maybe Code Project employs a bunch of H-1B's....
The forum heading says: For lazing about and discussing anything in a software developer's life that takes your fancy except programming questions.
hmmm... maybe Code Project employs a bunch of H-1B's
Seeing as how H1-B is a US job classification, and CP is located in Toronto, that's unlikely.
I know people are sensitive, and view discussions around H1-B (and other visas) as political, so perhaps spend less time rules-lawyering and listen to what the community suggests. Is it that hard to move over one discussion area, where you can spend less time discussing the appropriateness of the topic, and more on the topic itself?
Anyway, when I worked in the States, I was on an H1-B (for four of the five years), and knew of more than a few folk also on it. None of them were hired because they were cheap. I'd think that if a company wanted cheap, they'd outsource, and that definitely is Soapbox material.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 - You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 - When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
You're new (and welcome) to CP. I'd recommend a gentler profile until you get a good taste for how far you could should go. Everyone crosses the border now and then - but longevity is part of a flag that one's not here to troll or anything like that.
Not to say you're a troll - but raise your voice slowly. I got a down-vote today for some reason or other. The point of that is you never know when you hit someone in a sensitive spot on a bad day - so carve out your persona and niche as you wish, but remember that they are but mere mortals. There's a lot of tolerance. But feel the place out as you participate.
Huh? Maybe we are talking about something different. $40 and hour would be an extremely low contract rate where I am. Far as I can recall contract rates were probably always above 60 and went above 80.
why are we at $40-80/hr 25 years later
Overall employment compensation, not just tech, have not gone up significantly for 20 years. The why and causes of that cannot be categorized to any simple reason.
Your complaint is that H-1B workers steal American jobs and they are willing to work for cheaper wages.
Why don't you make same argument about jobs in various manufacturing industries that have been exported to China, Vietnam, South Korea, Bangladesh, etc?
You want your cheap TVs, PCs, cell phones, etc., but you want your programming wages must remain high!
Have you considered the fact that the H-1B workers pay US Federal and State income taxes and Social Security taxes whereas the Chinese assembly line worker is being paid pennies on the dollar compared to US wages but doesn't contribute to the tax system in the US?
You probably will be bemoaning the fact that the EU slapped a tax penalty of $14.5 billion on Apple because it is the God-given right of Apple to pay 0.0005% of its profits as taxes whereas you probably pay between 25 and 35% of your income as taxes.
Something of an irony, I'm a US based embedded guy working for a foreign company, becasue of a skill shortage in that country (and most ironic of all, lower oeprating costs in the US). Fortunately I don't need a work visa since I work from home, but in principle I believe the H1-B was a good idea when it started. The US (and other First World countries) does benefit from a brain drain, pulling the best and brightest from other countries. And in a way it helps the newly graduated in those other countries since it puts pressure on foreign companies to improve conditions at home.
The H-1B as it exists now is a joke. Companies like Wipro have destroyed it by grabbing every visa within minutes of issue, and using it to flood the outsourcing market. What I'd like to see is a quota, where any particualr company has a small limit on the number of available visa. Extend the quota to groups of related companies to block shell games. Wipro can't function in the US if all they can bring in is 100 bodies a year. Let companies bring in unique expertise, the way the H-1B was intended, but stop wholesale importation of inexperienced and cheap replacements.
The counter argument is companies like Microsoft will move R & D overseas, but there's nothing to stop that now. The foreign talent pool for 20+ year experience engineers can't match what's available in the US.
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
Yeah - but the real mischief's from the storm surge on the coasts and major runoff causing rivers to overflow their banks inland. That is so damaging, that, in a nutshell, it's why no private insurance carrier underwrites flood insurance; it's all through FEMA.
Trees blow down but the damage is only a local mess - floods ravage hundreds - thousands - millions.