operating-system

question regarding page size

Hello guys! I have a question How will you determine the page size of a unix machine using C code? ...

Wastage of resources in Virtualization

I am not sure if this is the write place to ask the question. However i hope it is. When looking for a VPS earlier today, I was trying to understand how each container would work in the background. Keeping in mind the fact that the operating system uses most of the power and power on a system, wouldn't having multiple operating systems ...

Simple VM That allows booting from folder or disk

I was wondering if there was a very simple and free virtual machine that would allow you to boot from a folder or disk image that couldn't damage my hard disk. I am using a MacBook and am looking into operating system programming. I found a tutorial on the internet that looked promising (http://www.viralpatel.net/taj/tutorial/hello_world...

How can I retrieve the amount of free RAM from a Java program?

Free RAM: my target metric. Java: my tool of choice. ???: a good way to get the former using the latter. ...

Segmentation in Linux : Segmentation & Paging are redundant?

Hello, I'm reading "Understanding Linux Kernel". This is the snippet that explains how Linux uses Segmentation which I didn't understand. Segmentation has been included in 80 x 86 microprocessors to encourage programmers to split their applications into logically related entities, such as subroutines or global and local da...

Context switch time - Role of RTOS and Processor

Does the RTOS play a major role or processor play a major role in determining the time for context switch ? What is the percentage of share between these two major players in determining the context switch time . Can anyone tell with respect to uC/OS-II RTOS ? ...

How does Software/Code actually communicate with Hardware?

My question is: When I press the "Shut down" button in Windows/Linux,the computer shuts down. How did the command "Shut down" actually make the computer Physically shutdown? To make my point clear: When we kick a ball,there is physical contact between the ball and our leg,for the ball to move.So how is the physical connection achieved...

[C++] Is it possible to use threads to speed up file reading ?

Hi there, I want to read a file as fast as possible (40k lines) [Edit : the rest is obsolete]. Edit: Andres Jaan Tack suggested a solution based on one thread per file, and I want to be sure I got this (thus this is the fastest way) : One thread per entry file reads it whole and stocks its content in a container associated (-> as ma...

Critical section problem

proces P0: proces P1: while (true) while (true) { { flag[0] = true; flag[1] = true; while (flag[1]) while (flag[0]) { { flag[0] = false; ...

Get the current operating system during runtime in C++

I need to figure out the operating system my program is running on during runtime. I'm using Qt 4.6.2, MinGW and Eclipse with CDT. My program shall run a command-line QProcess on Windows or Linux. Now I need a kind of switch to run the different code depending on the operating system. Thx ...

Are there are any remote process viewer libraries/softwares for multiple platforms?

some tools like yapm, can only view processes remotely view the process status(memory, cpu usage, etc) on windows platform. Are there any libraries/softwares can support process for multiple operating system, such as linux, unix, windows? ...

Communication between processor and high speed perihperal

Considering that a processor runs at 100 MHz and the data is coming to the processor from an external device/peripheral at the rate of 1000 Mbit/s (8 Bits/Clockcycle @ 125 MHz), which is the best way to handle traffic that comes at a higher speed to the processor ? ...

Polling or Interrupt based method

When should one use polling method and when should one use interrupt based method ? Are there scenarios in which both can be used ? ...

job, task and process, what's the difference

what is the difference between these concepts? ...

Is there a function to set a process stack/heap memory allocation?

I know this is an OS function. But is there a way of increasing your overall stack or heap size through C? sbrk() is used to change the size of data segment right? Does this imply both stack and heap? ...

Debugging with Bochs + GDB: "cannot find bounds of current function"?

I'm working on writing an OS and I'm running into problems trying to debug my code. I'm using GDB to connect to Bochs' GDB stub to "remotely" debug my kernel. Connecting works fine, as does loading debugging symbols from the kernel file. I set a breakpoint for the kmain function, which is successfully located, and the debugger breaks ...

Virtual PC (Program Developed on XP Runs on W7 Problem)

I have a developed a C++ application using 32 bit and it create a executable file. This project has uses some external library like window socket 32bit, Qt GUI and boost library. The dll is located at same directory with the executable. I wonder how can i run this application on window 7. MY window 7 version is Home Premium 64 bit. Th...

Question about 32-bit / 64-bit systems

Firstly, what is this called? Is this the system's "platform"? If I want to know if a system is 32-bit or 64-bit, do I ask what "platform" it is? Next, is what I wrote below correct: -A 64-bit processor can run a 64-bit operating system or a 32-bit operating system (with a loss of efficiency). -A 32-bit processor can run a 32-bit oper...

Python: os.listdir alternative/certain extensions

Is it possible to see files with certain extensions with the os.listdir command? I want it to work so it may show only files or folders with .f at the end. I checked the documentation, and found nothing, so don't ask. ...

Processor can support/require an RTOS ?

I have few queries related with going in for an RTOS for the different processors in hand. These are generic questions. Maybe you can clarify with examples specific to any processor/rtos or even generally. How to determine if a processor can support a RTOS ? How to know if the processor requires a RTOS ? ...