operating-system

Detect compilation on Bada OS

Hi, I would like to do something similar to #ifdef __linux__, but with the bada SDK. Is there a constant defined by default? Also, can I detect when I am compiling for the simulator? ...

Multi-Boot flashdrive with custom Grub or custom loader (make a program)

Ok guys i need help with this isuue (sorry for my english). Well i have two operating systems, very small ones. Kolibri (if you dont know it, i strongly recomend you to read about it) Kubuntu And also i have a program made in qbaisc who runs on msdos (a console program). Ok, the two OS are .iso booteable, and the program a simple ...

How is the code memory managed?

When talking about a process' memory, I heard about things like code memory and data memory. And for the data memory, there are 2 major managing mechanisms, stack and heap. I am now wondering how is the code memory managed? And who manages it? Pardon me if my statement is not so clear. Thanks. ...

module_init and init_module of linux

I have been trying to port few linux drivers and realized that there is substantial difference between kernel version 2.4 and 2.6 of linux. In the 2.4 version of kernel, the module programming was as below - #define MODULE #include <linux/module.h> #include <linux/kernel.h> int init_module(void) { printk(KERN_INFO "Hi \n"); re...

Building an Operating System

Hello friends, I would like to build an operating system, it's one of my dreams. Before that I like to recreate ubuntu or debian or something else. but before that I need some advice and help from all my friends. I am stuck in how to start what languages I need to build theories behind an OS lots of queries etc etc etc. I am happy i...

Limiting resident memory usage

I would like to limit the amount of physical memory a process can use without limiting the amount of virtual memory it can use. I am doing this in an effort to measure the behavior of various algorithms under memory pressure, and I need to test their performance with many different amounts of physical memory available - so I either need...

User-dependent file content

Hi. For some unfortunate reasons, I have to convert a proprietary and binary library from a one-user per workstation to a multi-user per workstation setup. Current setup. A user uses a program linked against a library. This library reads a system wide configuration file (using an hard-coded path, ie /usr/local/thelib/main.conf ) which ...

Philosophers Synchronization Algorithm

I was reading new materials ahead I came to know the term "Philosophers Synchronization Algorithm", but I could not understand it. Can anyone help me understand it what is it? Thanks ...

Stop invoking of new Shell/cmd prompt , python

hi friends., i have a python script which should invoke a .exe file to get some result. That .exe file is invoking a new windows command prompt(shell) . i dont need any output from the .exe file. i 'm using os.system('segwin.exe args') in my script where segwin is an executable. now my question is : i need to stop invoking cmd prompt...

Writing atomic function

Hi, I want to implement an atomic function in C language, so that the process or thread will not be preempted while executing the function. ...

How can I use the system's context menu for files in a Java application?

Hello, I want to display results of a file search. I want to enable a context menu for a file selection, which will be the system's context menu. For example, if the user right-clicks a file in Windows - I want to display the popup-menu with the options: Open Open with... Edit Send to... Copy Cut etc... And, if possible - this menu...

MMU and TLB miss

Suppose the following. I have a system with virtual memory with one lever paging, I have a MMU and the TLB thing is controled by software. Ok.. so imagine I'm a process, and I want to read a word in RAM of virtual address vaddr. So, the CPU gives the MMU vaddr, the MMU checks in the TLB if there's an entry with the (suppose) 5 most sig...

Writing a POSIX-compliant kernel

I've wanted to write a kernel for some time now. I already have a sufficient knowledge of C and I've dabbled in x86 Assembler. You see, I've wanted to write a kernel that is POSIX-compliant in C so that *NIX applications can be potentially ported to my OS, but I haven't found many resources on standard POSIX kernel functions. I have foun...

How to interface with an executable in C++

Hello, I have an executable that I need to run some tests on in C++ - and the testing is going to take place on all of Windows, Linux and Mac OSes. I was hoping for input on: How would I interface with the previously built executable from my code? Is there some kind of command functionality that I can use? Also, since I think the c...

Redirection stdout with low level api in C

Is there a way to redirect stdout with low level API... haven't found a function or a way to actually do this.... ...

Call C++ from an assembly bootloader

Hello, I have a small assembly bootloader that I got from this Tutorial. The code for the boot loader can be found here. I want to know if its possible to run c++ from this boot loader. I want to run a simple thing like this: #include <iostream> using namespace std; int main () { cout << "Hello World!\n"; return 0; } But as I can se...

Can applications running in ring0 be secure without formal verification?

How can one ensure security without formal verification of a program that runs in ring0? Could a VM be used without differing userspace kernelspace? ...

Operating System Implementation of events/signals/wait handles

Out of curiousity I was wondering how Operating Systems implement waking threads that are waiting on events/handles etc. For example say an OS thread continually scans through a list of wait handles and executes the respective threads if necessary. Not that I believe its implemented this way as it would seem inefficient. I think its m...

What OSes can I use if I want to use Intel Atom based board as an embedded system?

Hey guys Im planning to use Intel atom on a board for an embedded system. The embedded system will be running programs written in C for image processing. Since its an embedded system footprint is obviously a concern. I was thinking about using a modified version of the linux kernel. Any other options?? ...

Building a software based MMU and TLB

Hello guys, I am trying to hack an old unix kernel. I just want to implement the MMU and TLB using software. Can some one tell me what are the best Data structures and algorithms to use in building one. I saw lots of people using splay trees because its easy to implement LRU. Is there any better Data Structure ? What is the most efficie...