Yes, I have read many materials related to operating system. And I am still reading. But it seems all of them are describing the process and thread in a "abstract" way, which makes a lot of high level elabration on their behavior and logic orgnization. I am wondering what are they physically? In my opinion, they are just some in-memory "...
I write two windows console application as below
class ProgramA
{
static void Main(string[] args)
{
FileStream fs = File.Open(@"E:\console.txt", FileMode.OpenOrCreate);
StreamWriter sw = new StreamWriter(fs);
TextWriter old = Console.Out;
Console.SetOut(sw);
Console.WriteLine("Process A S...
In one of my c code file, one of the global variable which needs to be update by almost every procedure in that file, is being locked and unlocked with mutex everytime and at every place.
In my knowledge using too much of synchronization with mutex's lock and unlock definitely slow down the performance.
So, My query is that how can i g...
I know that there're stdout/in/err for a program and I want to redirect a program's output to a file instead of the console output. And I now figure it out with the code below:
FileStream fs = File.Open(@"E:\console.txt", FileMode.OpenOrCreate);
StreamWriter sw = new StreamWriter(fs);
TextWriter old = Console.Out;
Console.SetOut(sw);
Co...
I use the following code to allocate a Console for a WinForm application. The Console window shows up successfully and the output is there. But when I close the Console window, my WinForm applicaion is closed at the same time. Why? I want to keep the WinForm window.
private void btn_to_console_Click(object sender, EventArgs e)
{
if ...
Does anyone know of any project involving running LLVm without an OS, i.e. directly on x86 hardware?
...
I hope this is programming-related enough.
What exactly happens during the shutdown process of an Operating-System, let's take Linux here as its open-source and there may be more knowledge around about this.
(How) are the kernel threads terminated?
Does the power-supply stop supplying power (captain obvious) when the computer is in a ...
I am aware of the difference between a process running in user mode and one running in kernel mode (based on access restrictions, access to hardware etc.). But just out of curiosity, what is the difference between a process running in kernel mode and one running as root?
...
In windows operating system, the stack memory is a thread-specific storage, and the call stack is the logic flow of a series of methods. So each thread has it's own stack area. I want to know how heap memroy area is used? Is it thread-specific? Process-specific? Or in .NET, AppDomian-specific? Or shared between all the user applications ...
How can I boot my small console from a disk/cd/usb, with the following configuration:
The media that I want to use will be completely raw i.e no filesystem on it.
When I insert the media in my system or assume that its already inserted, I want to make it boot my own small OS.
The procedure that I want to use is that when my system st...
I am building programming contest software. A user's program is received by our judging system and is evaluated by compiling it and running it via a fork() and exec(). The parent process waits for the child (submission's process) to exit, and then cleans it up.
To give useful information about the program's run, I want to measure the CP...
what happens in the operating system exactly? for a recursive function mayb a stack overflow and for while(1)? please correct me if im wrong?
...
Will an application with an infinite loop hang the operating system if the application process has real time priority? Should I expect the same behavior on Linux, Windows and Mac OS?
...
Python documentation to Popen states:
Warning Use communicate() rather than .stdin.write, .stdout.read or .stderr.read to avoid deadlocks due to any of the other OS pipe buffers filling up and blocking the child process.
Now, I'm trying to figure out how this deadlock can occur and why.
My mental model: subproccess produces someth...
when i try to compile TOSSIM in tiny OS v-2.0.2 , this is the error that it is giving me
make micaz sim
Makefile:2: /opt/tinyos-2.1.0/support/make/Makerules: No such file or directory
make: * No rule to make target `/opt/tinyos-2.1.0/support/make/Makerules'. Stop.
how to remove this error?
...
While creating a file, you provide the name of a file to operating system and
it creates file and returns you the handle.
I am curious to know how it is created.
Does the operating system do some kind of hashing on file name to create a unique file handle
or does it increase count of created files and return it as a file handle?
...
I was considering using Windows Server as the OS for my main .NET development workstation. It includes the version of IIS to which I'm most often deploying, manages FIPS compliance differently, etc. I certainly don't use any of the multimedia or gaming advantages (if there are any?) of a workstation OS.
What pros/cons come with using ...
When I was reading Operating System Concepts (7e, Silberschatz, Galvin, Gagne), I encountered a study project about adding a system call to the linux kernel. The book says that
The system call numbers for recent versions of the Linux kernel are listed in
/usr/src/linux-2.x/include/asm-i386/unistd.h. (for instance, __NR_close, whic...
I need to setup NACHOS java version in Linux and run some simple sample . How to setup and run simple sample ? [need some tutorials and some computer assignment with solution with NACHOS]
...
I am reading a book that compares two ways of implementing threads, Middleware Threads and OS Threads. I don't know what the meaning of these sentences are exactly:
"A difficulty of operating system multithreading, however, is performance overhead. Since it is the operating system that is involved in switching threads, this involves syst...