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
425
votes
33answers
310k 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'...
169
votes
12answers
31k 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 ...
13
votes
7answers
4k 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 ...
14
votes
4answers
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 ...
2
votes
3answers
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 ...
5
votes
1answer
609 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 ...
69
votes
16answers
19k 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 ...
7
votes
1answer
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 ...
15
votes
3answers
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, ...
115
votes
4answers
68k 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 ...
45
votes
10answers
15k 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 & ...
27
votes
5answers
12k 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 ...
10
votes
3answers
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 ...
0
votes
1answer
196 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 ...
83
votes
11answers
22k 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 ...
21
votes
8answers
11k 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 ...
19
votes
6answers
2k 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 ...
8
votes
3answers
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. ...
9
votes
1answer
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 ...
1
vote
1answer
10k 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 ...
8
votes
5answers
23k 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-...
16
votes
8answers
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 ...
14
votes
9answers
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 ...
5
votes
2answers
6k 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 ...
4
votes
2answers
729 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 "...
1
vote
1answer
515 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 ...
0
votes
3answers
780 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....
6
votes
2answers
2k 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 ...
4
votes
4answers
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): ...
1
vote
3answers
924 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 ...
0
votes
1answer
494 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 ...
5
votes
2answers
877 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 ...
3
votes
1answer
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 ...
1
vote
4answers
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 ...
0
votes
3answers
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 ...