Questions tagged [operating-systems]

An operating system (OS) is a basic software whose rule is to intermediate software requisitions for resources and the hardware available, manage input/output, memory allocation/deallocation, file systems, among other basic tasks a device should do.

Filter by
Sorted by
Tagged with
424 votes
33 answers
316k views

How do I create my own programming language and a compiler for it [closed]

I am thorough with programming and have come across languages including BASIC, FORTRAN, COBOL, LISP, LOGO, Java, C++, C, MATLAB, Mathematica, Python, Ruby, Perl, JavaScript, Assembly and so on. I can'...
171 votes
12 answers
33k views

How do operating systems… run… without having an OS to run in?

I'm really curious right now. I'm a Python programmer, and this question just boggled me: You write an OS. How do you run it? It has to be run somehow, and that way is within another OS? How can an ...
Thor Correia's user avatar
  • 1,433
13 votes
7 answers
5k views

Why can we not insert into files without the additional writes? (I neither mean append, nor over-write)

This occurs as a programming language independent problem to me. I have a file with the content aaabddd When I want to insert C behind b then my code needs to rewrite ddd to get aaabCddd Why can ...
User's user avatar
  • 795
14 votes
4 answers
1k views

What are best practices for testing programs with stochastic behavior?

Doing R&D work, I often find myself writing programs that have some large degree of randomness in their behavior. For example, when I work in Genetic Programming, I often write programs that ...
John Doucette's user avatar
5 votes
1 answer
647 views

How do programming languages integrate with OS runtimes

For example, Objective-C, Swift and Ruby (i.e. RubyMotion) integrate with the Cocoa framework. Is this done via linked libraries? I assume they call functions in existing binaries instead of simply ...
Brenden's user avatar
  • 153
2 votes
3 answers
3k views

Compiler/OS Design - Where to start [closed]

I have a fairly strong background in C and Assembly and I am starting to look into basic compiler and operating systems design, but my biggest problem is where I should really start, seeing as both ...
Jeff Langemeier's user avatar
70 votes
16 answers
21k views

Is it a waste of time to free resources before I exit a process? [duplicate]

Let's consider a fictional program that builds a linked list in the heap, and at the end of the program there is a loop that frees all the nodes, and then exits. For this case let's say the linked ...
15 votes
3 answers
7k views

How does multitasking work

I am completely clueless about the inner workings of an operating system, but I can more or less guess the approximate behaviour of many functions. One thing that I am not able to figure out, though, ...
Andrea's user avatar
  • 5,355
7 votes
1 answer
12k views

Understanding Application binary interface (ABI) [closed]

I am trying to understand the concept of Application binary interface (ABI). From The Linux Kernel Primer: An ABI is a set of conventions that allows a linker to combine separately compiled ...
Tim's user avatar
  • 5,415
115 votes
4 answers
72k views

What operating systems are used in airplanes, and what programming languages are they developed in? [closed]

I was wondering if anyone knows what is the operating system used in commercial airplanes (say Boeing or Airbus). Also, what is the (preferred) real-time programing language? I heard that Ada is used ...
adhg's user avatar
  • 1,149
44 votes
10 answers
16k views

Why not have a High Level Language based OS? Are Low Level Languages more efficient?

Without being presumptuous, I would like you to consider the possibility of this. Most OS today are based on pretty low level languages (mainly C/C++) Even the new ones such as Android uses JNI & ...
rtindru's user avatar
  • 559
29 votes
5 answers
14k views

Is it possible to read memory from another program by allocating all the empty space on a system?

Theoretically, if I were to build a program that allocated all the unused memory on a system, and continued to request more and more memory as other applications released memory that they no longer ...
ConditionRacer's user avatar
11 votes
3 answers
2k views

Is it a good idea to do TDD on low level components?

I'm considering writing a low level driver or OS components/kernels. The osdev.org folks seem to think that the important bits are not meaningfully testable this way, but I have read some discussions ...
Bill's user avatar
  • 8,330
0 votes
1 answer
212 views

How are low-level I/O models mapped into stream I/O abstraction?

High-level languages often expose stream-based I/O abstraction to the programmer, where blocking or non-blocking streams offer select/read/write operations. (AFAIK, message-based I/O seems is usually ...
max's user avatar
  • 1,075
85 votes
11 answers
23k views

Why is software OS specific?

I'm trying to determine the technical details of why software produced using programming languages for certain operating systems only work with them. It is my understanding that binaries are specific ...
user139929's user avatar
21 votes
8 answers
12k views

Are there any OS which are simple enough for learning? [closed]

I would really like to understand how an operating system works behind the scenes. However, I think that the kernel of most open-source OSs out there are too complex for learning purposes, even for a ...
DotNetStudent's user avatar
20 votes
6 answers
3k views

How did we get saddled with the (hierarchical) filesystem as the basic data structure?

I'm self-taught and I don't have a CS degree. The more I've been learning about data structure, the more I wonder, in this day and age, how are we still saddled with the filesystem, with directories ...
user1936's user avatar
  • 662
16 votes
8 answers
3k views

What exactly is distributed computing? [closed]

What exactly constitutes distributed computing, and how does it differ from parallelized / concurrent computing? Does the use of mutexes and semaphores in multiple parallel threads trying to ...
rdasxy's user avatar
  • 3,323
14 votes
9 answers
2k views

Is Ubuntu workable as a laptop for an IT consultant?

I work as a consultant programmer, typically in large businesses. I use a Windows Laptop, and many of my colleagues use a Mac. My personal preference would be to run Ubuntu if I could have complete ...
Eric Wilson's user avatar
  • 12.1k
9 votes
1 answer
3k views

Understanding the levels of computing

Sorry, for my confused question. I'm looking for some pointers. Up to now I have been working mostly with Java and Python on the application layer and I have only a vague understanding of operating ...
RParadox's user avatar
  • 209
8 votes
5 answers
26k views

Is it possible to write an operating system in C? [closed]

A while back I saw a comment on a Stack Overflow question that surprised me: No one can write an operating system in C. It is not possible. What one can do is write an operating system in a C-...
Crashworks's user avatar
  • 1,249
8 votes
3 answers
7k views

Why system calls are limited to C language as far as I see?

From my Operating System textbook, application and library interact with kernel by system calls. But as far as I can see, Windows, OS X and Linux, we can only use C Language to post system calls. ...
Sayakiss's user avatar
  • 285
6 votes
4 answers
3k views

How does a program make a system call

I'm reading Tanenbaum's Modern Operating Systems and I really can't grasp the following concept: how does a program make a system call? I mean, i got the very basics down (correct me if I'm wrong): ...
Federico Luzzi's user avatar
6 votes
2 answers
3k views

Pthread scheduling (System and Process)

I've read the operating system concepts 8th edition written by abraham silberschatz. However, I don't understand Pthread Scheduling. Thread-library schedules user-level-threads on LWP(Lightweight ...
Danny_Kim's user avatar
  • 241
5 votes
2 answers
927 views

are multithreading, multiprocessing, multitasking implemented at instruction set or OS?

On a computer with a single cpu core, must a multithreading program be implemented based on an OS? Can it be implemented in the instruction set and run without an OS? Can multiple programs run in ...
Tim's user avatar
  • 5,415
5 votes
2 answers
7k views

How do you usually compile C/C++ source code ? (Large code bases) [closed]

It's been quite some times since I began learning C and C++ but I've been very limited only to the Windows platform and the Visual Studio environment. Recently, I wanted to look into some open source ...
user avatar
4 votes
4 answers
8k views

What is the relationship between a program and processes in the Operating System?

A program, I am referring to any program written in any programming language. It could be a Java program which has only one method to do the multiplication, and a main method executes that ...
s-hunter's user avatar
  • 185
4 votes
2 answers
786 views

Can I fork Linux source code, change it around to suit my desires, and claim it as my own kernel without doing any of the originating work?

Is it acceptable form to take Linux kernel source from any version, change it, claim it is mine, and then distribute it for monetary gain? In such a case open-source software is entitled to a sort of "...
user avatar
3 votes
1 answer
5k views

Windows Console App vs Service

My Situation I work for a company that builds software for many other companies. When I learned installers weren't built-in with VS2012, I was curious how to deploy. So far, I have just been dropping ...
Travis Parks's user avatar
  • 2,495
3 votes
1 answer
12k views

how is stack and heap are assigned to each processes?

How multiples processes are stored in the main memory , i understand every process will be divided into the equal size pages and will be stored in the frames of main memory. if whole main memory is ...
navs4me's user avatar
  • 39
1 vote
1 answer
964 views

Is there still busy waiting in the process-blocking implementation of a semaphore?

Operating System Concepts discusses two implementations of a semaphore, by busy waiting in Section 5.5 and by blocking the current process in Section 5.6: Section 5.5 A semaphore S is an integer ...
Tim's user avatar
  • 5,415
1 vote
4 answers
2k views

Testing on different operating systems

I am a developer who has windows 7 installed as the host operating system with vmware. I have linux installed using vmware. Therefore I am able to test java and c++ apps on windows 7 and Linux. I ...
w0051977's user avatar
  • 7,021
1 vote
3 answers
1k views

Why is call stack not implemented as a dynamic array in modern OS? [duplicate]

When a modern OS loads a process, it pre-allocates a certain amount of space for stack. This means that the programmer has to be careful to avoid stack overflow by limiting call depth and/or by ...
max's user avatar
  • 1,075
0 votes
1 answer
597 views

Two C program sharing same addresses

I was trying to understand structure padding , so i wrote a simple program as written below and i executed it . just to make clear i made two copy of this program program1.c and program2.c and ...
user143252's user avatar
0 votes
3 answers
2k views

Multiprocessing vs multithreading

During my last job interview which was about half year ago, the technical guy asked me, whether the better option is to use e.g. 100 processes to do some work, or only one process but with 100 threads....
bielu000's user avatar
  • 267
0 votes
3 answers
1k views

How does the operating system regain control when multitasking? [duplicate]

I get how multiple processes can run on a single core by interleaving the processing. What I don't understand is how the operating system ensures that the program releases the processor after a ...
ConditionRacer's user avatar