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
31 votes
7 answers
11k views

Why is it called a "trap" instruction?

To execute a system call, a program must execute a special trap instruction. Why is it called a "trap" instruction? What is the etymology of this usage of the word "trap"? Is it ...
2 votes
2 answers
213 views

Operating systems - whose responsibility is it to coordinate process I/O requests?

I am reading Tanenbaum's Modern Operating Systems. I want to understand a particular concept regarding processes and blocking system calls, specifically with regards to I/O. I assume threads might ...
1 vote
3 answers
439 views

Still confused why a monolithic operating system is faster than a layered operating system

In the book Operating System Concepts, In the summary it states: A monolithic operating system has no structure; all functionality is provided in a single, static binary file that runs in a single ...
0 votes
7 answers
806 views

Within the same computer, what is the difference between API and IPC?

So, an Application Programming Interface is a way for two or more computer programs to communicate with each other. An application programming interface (API) is a way for two or more computer ...
-1 votes
2 answers
551 views

Dealing with multiple application instances

I'm developing an application (Java & JavaFX) that writes/reads data (a file). The problem is I don't want to restrict user to run only one instance (of my app) at a time, as I really can't think ...
-1 votes
1 answer
107 views

System Monitor vs Operating System [closed]

I'm having a tough time finding the distinction between the two. My understanding is that "operating system" refers to a more abstracted job monitor with extended functionality (e.g. task-...
33 votes
7 answers
7k views

Why do modern operating systems *ever* have perceptible input (keyboard/mouse) lag?

Sometimes computers stutter a bit when they're working hard, to the point where the mouse location freezes for a fraction of a second, or stutters intermittently for a few seconds. This sometimes ...
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 ...
-4 votes
1 answer
140 views

How do different operating systems have different window layouts? [closed]

I have searched on the Internet on how do operating systems have different window layouts, but I have found nothing. Windows has one style, Mac OS has another, and Linux has a different style as well. ...
-2 votes
2 answers
270 views

Isn't OS dependent on machines, can anyone briefly explain how it is achieved? [closed]

Certain OS in it's system requirement doesn't specify anything peculiar like in case of ubuntu it asks only for "2 GHz dual core processor or better". If yes, how does it compares with ...
23 votes
5 answers
7k views

Where did usage of OS signals go?

From what books I read on linux system programming, it seems like signals were the primary way to communicate events between processes. They were the gateway into many interesting functionalities, ...
8 votes
9 answers
791 views

Would we need Docker if applications were better behaved?

A well-written program will be configurable. It will have a configuration file or database which specifies where to look for files, which network ports to open etc. An Operating System lets many ...
8 votes
4 answers
972 views

Writing a bootloader with no bootloader

I have a question that I really can't find a straight answer to. Let me start by saying I'm not asking for a step by step tutorial, or even plan on doing anything. I'm just curious. I've been ...
0 votes
2 answers
282 views

Building a program that truly deletes everything

We all know that if we delete a file, the operating system is recycling it but doesn't actually delete it. It just removes it from the directory indexes, and until the data is needed and overwritten, ...
2 votes
3 answers
167 views

Is ABI governed by hardware or is it only an agreement between software

ABI (Application binary interface) defines things like caller and callee saved registers, stack use, register use, end-of-routine stack pop etc. Is ABI only an agreement between compilers and other ...
0 votes
3 answers
199 views

Sysadmin password storing

I'm quite unexperienced in the sysadmin area. Now I'm facing the responsability of managing two (remote) servers. I'm working in an informal organization. So I have passwords for the OS's users, ...
-1 votes
2 answers
208 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....
0 votes
1 answer
463 views

What's contained in 'kernel mode' in virtual address space of a process?

I'm reading through Mickens' OS notes, and I came across the following depiction of a virtual address space. I conceptually understand "user mode" of a process' virtual address space. It ...
2 votes
2 answers
210 views

Can the operating system "break up" a memory allocation (Linux)?

Let's say a process (P1) is asking for 100 MB of memory, and the RAM looks like this: [[50 MB free] [USED] [60 MB free] [USED]] Since there are technically enough memory that are available (110MB ...
3 votes
1 answer
121 views

Trying to understand OS-Level Virtualization

I'm trying to learn more about the fundamentals of containerization. I came across the term "OS-Level Virtualization" as the partitioning of the user space to further increase process ...
5 votes
1 answer
479 views

How exactly are drivers developed, distributed, & utilized?

If operating systems use 'drivers' to communicate with external devices, does that then mean that OS's (like windows, linux, & osx) have to come prepackaged with drivers for every single external ...
2 votes
1 answer
2k views

Why does a condition variable's wait() release the associated mutex before blocking and reacquire it before returning?

Stallings' Operating System book says about condition variable in Solaris, A condition variable is used to wait until a particular condition is true. Condition variables must be used in ...
1 vote
1 answer
961 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
1 answer
810 views

Is a mutex lock always implemented as spin waiting?

Is a mutex lock always implemented as spin waiting? Can a mutex lock be implemented as block waiting? (Operating System Concepts section 5.4 only mentions the implementation by spin waiting. See below....
-4 votes
1 answer
169 views

Who perform deadlock prevention, avoidance and check and recovery?

In OS books (e.g. Operating System Concepts), there are three strategies of dealing with deadlock between processes or threads: prevent, avoid, and check and recovery. Who performs the strategies? ...
1 vote
1 answer
400 views

Does a safe state not lead to a starvation state?

In Operating System Concepts: 7.5.1 Safe State A state is safe if the system can allocate resources to each process (up to its maximum) in some order and still avoid a deadlock. More formally, a ...
-3 votes
1 answer
183 views

Is there any reason I shouldn't use a LInux host for a Linux guest VM?

I'm a developer and my typical environment is to use is a Linux guest OS running inside VirtualBox on a Windows host. Most software companies don't allow developers to install Linux bare metal on ...
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....
-1 votes
2 answers
696 views

How can Monolithic kernel based OS are faster the Microkernels?

I have been studying about OS and currently, I am on "types of the kernel". Now in the book and some websites are saying Monolithic kernel-based OS is faster, but how are they faster than ...
29 votes
3 answers
5k views

Kernel mode web servers: A clever optimization or a security nightmare?

I was reading a Hacker News thread where one user posts a link from 2011 explaining that IIS is much faster than most other (*nix) web servers. Another user replies, explaining that IIS gets that ...
-2 votes
2 answers
512 views

How does a process get notifications from the operating system?

In UIKit framework, there are methods associated with app’s life cycle events like applicationWillEnterForeground(_:) which are called at appropriate times. How can I make a process receive such ...
0 votes
1 answer
216 views

What does it mean for an OS to compile down to a function?

I was reading the Urbit docs and stopped at this paragraph (emphasis mine): The main thing to understand about our ‘overlay OS’, as we call it, is that the foundation is a single, simple function. ...
-2 votes
5 answers
734 views

Is an OS compiled every time it boots?

Is an OS compiled every time it boots, or is it compiled once and the result used every time the OS is (re)booted? When users change settings, is the compiled kernel modified at all? If I am the one ...
6 votes
3 answers
691 views

How does an OS limit a program capabilities, if it's working directly with the cpu?

When a program loads into memory and starts running, the cpu loads each instruction from the code and executes the instruction based on the opcode and the arguments, so, the program interracts so to ...
1 vote
2 answers
86 views

What does the inode point to in case of a device file other than the disk?

I know that the inode points to the actual disk blocks in the case of the normal file system. But what does it point to in the case of .... say .... the terminal device file. Does it point to the ...
-2 votes
1 answer
100 views

Trick or technique to allocating variables given only one "memory store"?

I have a problem where I am using a Uint32Array in JavaScript as a store: const store = new Uint32Array(1 << 16) I am going to use this store like a runtime environment. Basically, everything ...
-1 votes
1 answer
43 views

How to check whether module or class is network interface, socket?

Background Simplifying, assume I want to write some tool for code-analysis, which tell me which files - class/module - are/have some kind of network interface(s). No matter if it's REST Controller, ...
1 vote
2 answers
258 views

Comparing microservice to MINIX microkernel

I'm trying to understand what microservices are and MINIX's microkernel architecture seems to be a good analog. (I'm a systems engineer.) In my understanding: Microservices are like user space ...
-3 votes
1 answer
84 views

How do I find out all modifications made by installing software? [closed]

So I want to find out how to get a list of all modifications made by installing a piece of software. For example. If I install Word, I want to see all directories created, classes registered, dlls, ...
1 vote
0 answers
116 views

FreeRTOS based application architecture

I am going to use the FreeRTOS on my hardware platform. My plan is to model individual tasks as C structs containing task execution period, task priority, task stack size, task name and maybe another ...
1 vote
1 answer
890 views

How do ISRs and user threads synchronize and share data?

My question is more of educational than an actual coding problem. I tried searching the web, but got little help. I am trying to learn how to write ISR and understand how they interact with user ...
0 votes
1 answer
428 views

How are symbols resolved in dynamic linking and loading?

I'm a CS student, and I'm doing a project on shared libraries and dynamic linking/loading. One of the questions I have to answer is how symbols are resolved with dynamic linking/loading. I've scoured ...
1 vote
1 answer
282 views

How is a software able to read a network file faster than it appears to be possible?

Note this is a general, conceptual question about performance optimization. motivated by the following real-world case. I have a file on a Windows network drive that has a 100Mbps limt; it is a ...
4 votes
4 answers
181 views

Would it be possible to abstract multi-threading ability for programs not originaly designed for such?

Would it be feasible to provide (or further) multi-core threading ability for programs that weren't originally designed for such? And doing so by creating a "virtual" CPU core (or for i7's with ...
2 votes
0 answers
118 views

Is it possible to implement insert file operation in modern extent-based filesystems?

The problem was already discussed here. But there was not consensus on this topic. I have some thoughts on how insert operation can be implemented for some popular file systems. If FS has extent-...
3 votes
4 answers
936 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 ...
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 ...
-2 votes
1 answer
186 views

Are all sockets implemented as per the Berkeley sockets specification?

Are all sockets implemented as per the Berkeley sockets specification in all platforms or languages? What I am trying to understand is; is this the only standard for sockets implementation or there ...
0 votes
3 answers
311 views

How do you optimally and securely isolate processes when building an operating system from scratch?

I am trying to build software in JavaScript that emulates an operating system. For all intents and purposes, it is an operating system, even though it is JavaScript and we are running in the Node.js ...
0 votes
2 answers
1k views

Where is the difference with client-socket port and server-socket port?

If we decided to create a (TCP) socket-server (for example) on port 12336 imagine it like a: socket.bind(12336) and then to create a (TCP) client-socket for it, like a: socket.connect("12.34.56.78"...

1
2 3 4 5