Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
60 views

Making execution of Python script fool-proof beyond adding shebang

Assume that a Python package (available via PyPI) is too difficult for novice users to utilize. Specifically, typing python2 path_to_package/start_GUI.py in the command line, which opens a TKinter GUI,...
0
votes
1answer
69 views

Is memory allocation hardware handled or OS?

I am currently working on a bare metal project with an arm processor using GCC arm compiler. If I call malloc, is the allocated memory tracked in the MMU? For some reason I had assumed an OS typically ...
0
votes
0answers
99 views

Is it possible for a rust programming language to develop an Operating system?

I just want to know . rust is said to be system programming language then, is it possible for rust programming language to develop an Operating system and all the necessary driver without using C or C+...
2
votes
1answer
205 views

Why non-mainstream OSes don't adopt Linux hardware drivers?

Non-mainstream OSes (Genode, BSD, Haiku, etc.) tend to have problems with drivers availability/support. Why don't they reuse Linux drivers? I would imagine they could provide some ABI compatibility ...
0
votes
2answers
95 views

How did old OSs create or expand a segment in memory without issues?

On an 8086 CPU before the flat memory model had been adopted, when the OS wanted to create a new segment for a process, how did it know what virtual memory ranges were already covered by existing ...
4
votes
2answers
202 views

Do operating systems implement techniques to ask programs to give up non-vital memory in times of shortages?

When a system is running low on available memory can it ask programs in general to give up any non-vital memory without shutting down. Like a process signal which causes the processes to yield any ...
-3
votes
0answers
65 views

How does an Operating System gets allocated its first memory space [duplicate]

Going through osDev.org, I managed to write a small kernel that outputs a memory address, similar to this: #include <stdio.h> int main() { size_t a = 2; size_t *p = &a; printf("...
1
vote
0answers
87 views

Daemon vs worker and when to use what?

(Note that, below, I am frequently using term "daemon or worker" just to indicate that I dont know which word to use as I dont know the exact difference between them in the context explained below.) ...
2
votes
1answer
171 views

What is the difference between writing in assembly vs converting high level language into assembly using compiler?

So i heard that in modern operating systems and device drivers, some parts of them are still written in assembly for better memory optimisation and speed but do developers actually write it in ...
2
votes
2answers
114 views

producer-Consumer with Signaling Architecture in a Real-Time Operating System (RTOS)

I'm developing a real-time system by making use of an mbed-OS (RTOS for ARM architecture). I'm not a software engineer and I want to know whether the following solution is practical or not, and how to ...
3
votes
1answer
110 views

Regarding system interrupts and timers. Why programs sometimes still run when OS asks you to terminate or keep it going?

I'm reading (just started) "Operating systems concepts" by Silberschatz, Galvin and Gagner and something called my attention when reading a basic primer on "timer" (1.5.2 on the book). It says: As ...
2
votes
2answers
195 views

Designing a Way for Process to Communicate with Kernel

I've got a project that is sort of a virtual operating system. In this project, the Kernel class is responsible for creating Process classes. The process class consists of Thread classes and the ...
3
votes
1answer
211 views

What are the risks of relying on the O.S layer (commands and shells) as programming platform?

Context I'm about to start a new project for my company1 which architecture will comprise several elements. There are 2 mobile applications (Android and iOS), a web API (Java) and an ETL (still ...
0
votes
1answer
196 views

Asynchronous communication from synchronous communication

Studying Inter Processes Communication in Operating System, I've discovered that asynchronous communication can be built on top of synchronous communication. But, it's not clear to me how can it be ...
-3
votes
1answer
256 views

Is operating system Universal Turing Machine?

The definition of UTM(Universal Turing Machine) is a Turing machine that can simulate other Turing machines, so as far as I can guess operating system is a UTM, since it can run multiple programs on a ...
-2
votes
1answer
676 views

First Fit Algorithm Memory Allocation

I am currently reviewing memory partitions and I have a problem that is really confusing me. Suppose you have 5 memory partitions: 100K, 500K, 200K, 300K, and 600K. Also suppose you have 4 ...
4
votes
3answers
1k views

What does “address space” means when talking about IO devices?

The following quote is from this page: While some CPU manufacturers implement a single address space in their chips, others decided that peripheral devices are different from memory and, ...
4
votes
1answer
506 views

What is so different about RTOS compared to normal programming?

Classical programs run a loop with prioritized ISRs. How do RTOS do this differently of better?
0
votes
1answer
140 views

When working in a multi operating system team, what are some of the pitfalls to bear in mind?

I'm working in a team where there are several different OS present (windows, various linux distributions (Ubuntu, Mint) as well as Macintosh). Projects are passed around and we have already come ...
12
votes
2answers
593 views

Does a file system “see” the storage device as a (very large) byte array?

I want to know how does a file system write to and read from a storage device. I think this is how it works: A file system doesn't access the storage device directly, but rather the storage device ...
4
votes
2answers
378 views

Can file systems be designed and implemented in an OS-portable way?

Given the interfaces that major OSes (Windows, macOS/OS X/Mac OS X, Linux) provide to file systems, can file systems be designed and implemented in a way that is largely independent of OS? I'm not at ...
11
votes
8answers
8k views

Are C strings always null terminated, or does it depend on the platform?

Right now I am working with embedded systems and figuring out ways to implement strings on a microprocessor with no operating system. So far what I am doing is just using the idea of having NULL ...
3
votes
3answers
3k 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. ...
4
votes
2answers
208 views

Criteria for a language (Terra as a tricky example) to be usable for operating system development, and how to meet missing criteria

For example, a language that I was looking at recently- Terra. You can address the question in the context of any language, I'm just most comfortable with Lua so I'm starting from there. The Terra ...
3
votes
4answers
2k 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): ...
2
votes
4answers
270 views

Is it possible for a computer system to have constant/zero CPU load?

For example, a simple program in a simulated environment that waits for user input seems to be doing no work, so I guess it uses CPU only for the time. I'd like to know if computer systems (that don'...
1
vote
2answers
779 views

GO - Goroutine and Concurrency

Background: Threads use pre-emptive scheduling, whereas fibers use cooperative scheduling. With threads: the current execution path may be interrupted or preempted at any time This means that ...
0
votes
1answer
126 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 ...
0
votes
4answers
665 views

Why are computer systems still insecure? [closed]

After 50 years of software engineering, why are computer systems still insecure? I don't get it. Two questions: (i) What's so hard about just denying or restricting networked access to bad actors who ...
0
votes
4answers
348 views

Is there a way to see how many operations a function, block of code or a statement costs?

Let's say I have a phone that can process 1 million operations per second and a micro controller that can perform 1000. Is there a way to tell how many operations a performed by a function or block ...
90
votes
11answers
18k views

What is meant by the phrase “Software can replace hardware”?

Studying beginners course on hardware/software interface and operating systems, often come up the topic of if it would be better to replace some hardware parts with software and vice-versa. I can't ...
1
vote
3answers
590 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 ...
1
vote
1answer
1k views

Are some operation system (kernels) more efficient with hardware than others?

When comparing the Windows, macOS, and Linux kernel to each other, do some make better use of hardware in terms of cache efficiently, page lookups, or power consumption? I noticed this after ...
3
votes
1answer
3k views

Implement a monitor in terms of semaphores

From Operating System Concepts by Abraham Silberschatz, Peter B. Galvin, Greg Gagne 5.8.3 Implementing a Monitor Using Semaphores We now consider a possible implementation of the monitor ...
0
votes
1answer
61 views

Windows Console App vs Service, Part II

Windows Console App vs Service I would like to extend the question at the above post, as the previous answers did a great job of helping me understand the difference between a service and not a ...
-3
votes
1answer
109 views

Loading My Custom OS from USB flash drive

Suppose I want to create a portable OS, that needs a USB flash drive only to work. and i wrote my boatloader in the first sector to be loaded by the BIOS, from here on, what can I do to load my OS ...
-1
votes
1answer
116 views

How to understand an OS's source? [closed]

I usually understand code by fiddling around, or by inserting printfs here and there, but this time around, that isn't possible, since the end product is an OS, so any suggestions on how to tackle ...
-3
votes
1answer
81 views

Operating System Licensing: Open Source License with reciprocity but built-in exceptions?

In a recent internship, I worked on a project involving traffic detection using radar. The company developed their own unique hardware and ran Windows Compact Embedded on an ARM processor. I thought ...
3
votes
2answers
47 views

Executable verification in user mode

I am posting this here instead of on Stack Overflow because this is more conceptual. I am primarily thinking of this a Linux context, but this can be extended to other operating systems. When I didn'...
5
votes
1answer
386 views

Concept of push notifications - why is it only on mobile platforms? OSX/Windows/Linux?

At an operating system level, mobile operating systems support the notion of push notifications or a socket level 'persistent' communication with an app, whenever it is online. Why have the major ...
0
votes
1answer
91 views

Can a zombie process get scheduled?

Since zombie processes are processes having all resources freed but still existing in process table because their parent might ask for their return status, is it a separate state in Linux like ready, ...
-2
votes
5answers
2k views

Is learning about operating systems useful for a software developer? [closed]

Most of the underlying workings of the operating system is hidden from the programmer. I believe that is also one of the purposes of an operating system. Then what are the reasons a software developer ...
0
votes
1answer
255 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 ...
-2
votes
1answer
2k views

Can an OS be created with Python?

I have been pondering over the idea of a Python-based Operating System on top of the Linux kernel, much like how Android uses Java. What if most of the system components were built using Python, this ...
1
vote
4answers
3k 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 ...
0
votes
1answer
5k 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 ...
3
votes
1answer
111 views

How does I/O occur for large data files?

Assume that we have a 4GB RAM processor. Let's say we want to play a 4GB movie in VLC player. Now, processor first starts VLC Process and then starts to load 4Gb data. My question is how does this ...
0
votes
2answers
1k views

Why a thread uses a stack in a context switch?

Correct me if I'm wrong, but if I have an operating system that makes a context switch, then that context switch is in practice a switch from one thread to another, where one thread was running one ...
-1
votes
2answers
147 views

How to write code for different versions of linux

So, I've written some fairly big code for cent OS 7.1. The code essentially makes use of different command line tools by parsing the text output and shoving it in a database... pretty straight forward....
6
votes
2answers
469 views

Why is threading platform-dependent?

I am reading book "Foundations of Qt Development", Chapter 12, and I read that threading is platform-dependent, can someone explain, why? I know how to use threads but that what they said is not so ...