As the semester's deadlines approach, I decided to start working on a project in Operating Systems course at my college.
The problem with the project assignment is that it requires students to develop a user application (exe
) that will execute as a simple kernel ( basic process and thread management ).
First thing that popped to my mind was : How the hell am I supposed to execute privileged code in user application?
After consulting with other students ( who did the project on time ), I learned that they were able to execute privileged code without problems using Borland 3.1 compiler. However, none of them found that weird nor knew why that worked. Why ( better question here would be how ) does Borland do this? Doesn't this violate fundamental principles of OS security?
Note: I added C++ tag because the project is supposed to be written as a C++ application, with most of the privileged code executed as inline assembly.
Update My question was somewhat poorly phrased originally. Of course I was able to compile code with privileged instructions with any compiler - running the code was the problem.
c++
tag and decided to do so. – Liar