Questions tagged [operating-system]

An operating System (OS) is a software program whose role is to be an abstract layer between software requisitions for resources and the hardware available, manage input/output, memory allocation/deallocation, file systems, among other basic tasks a device (not necessarily a computer) should do.

An operating system (OS) is a basic software whose role is to be an abstract layer between software requisitions for resources and the hardware available. The basic components of an operational system can be listed as:

  • Boot loader

Although some may say it is not part of the OS, it's the starting point where the hardware after doing booting routines transfers the control to a small procedure that will bring up the entire system

  • User interface

Can be graphical or text-based, is the central point of communication between the user and the OS

  • Kernel

The core of the OS that manages all the resources of the hardware according to the requisitions. Kernels can be either a micro kernel or a monolithic kernel. Both types include the following functionality:

  • Process management (scheduling, multitasking, pseudo-parallelism, and so on)
  • Memory (and virtual memory) management
  • Inter-process communications (IPC)
  • Interrupt management

Monolithic kernels include these additional features:

  • File system and disk access organization
  • Device management (with the aid of device drivers, plug-and-play routines, dynamic modules, and so on)

These features are not included directly in a micro-kernel, but are instead implemented in tasks. One example of a fairly widely used micro-kernel is QNX. As well, many hypervisors are micro kernel designs. A major argument for micro-kernels is that their small size makes them easier to analyze and more secure.Tanenbaum

Most well known operating systems are monolithic. In fact, the majority of commercial and Open source OS's are monolithic. Generally they allow faster hardware response.

Book : Operating System Concepts by Abraham Silberschatz

Recommended preliminary reading before posting a question: OSDev Wiki

See also: .

13710 questions
4
votes
2 answers

How can preemptive multitasking work, when OS is just one of the processes?

I am now reading materials about preemptive multitasking - and one thing escapes me. All of the materials imply, that operating system somehow interrupts the running processes on the CPU from the "outside", therefore causing context switching and…
Karel Bílek
  • 36,467
  • 31
  • 94
  • 149
4
votes
1 answer

How to debug kernel written in c++?

I am developing my kernel in C++. So can any one please explain me step by step How to debug a kernel? I am using Linux OS and GCC and NASM for building my kernel. Ans for testing kernel i am using genisoimage and virtualbox 4.x Help Me. Thank you.
user636424
4
votes
2 answers

Installing Flutter using Homebrew

I would like to install Flutter on my Apple M1 machine using Homebrew. But I am a bit hesitant because I am not sure if this will provide any benefits or it will create more trouble (e.g. permission issues). An alternative way would to be install…
ilpianoforte
  • 1,180
  • 1
  • 10
  • 28
4
votes
1 answer

Can Kernel use virtual memory In Linux

My question is whether linux kernel can use virtual memory or does it always uses fixed memory? Another question is that if due to some soft error, the kernel memory is corrupted, what will happen then? Does Linux has any mechanism to protect itself…
MetallicPriest
  • 29,191
  • 52
  • 200
  • 356
4
votes
3 answers

How does main() receive command line arguments?

With the standard C++ entry: int main(int argc, char *argv[]) { // stuff } How is argv populated? The compiler has no idea what size to allocate for an array and I would assume the OS is the entity responsible for passing the additional…
user8087992
4
votes
1 answer

SIGABRT doesn't generate core dumps in MacOS

In macOS, I find that SIGABRT won't generate core dumps in some cases. For example, I run a sleep in one terminal: lianxin.wlx@mbp [01:08:21] [~/test] -> % sleep 1000 And send a SIGABRT to it in another terminal: lianxin.wlx@mbp [01:08:59] [~] -> %…
Lixin Wei
  • 441
  • 5
  • 17
4
votes
5 answers

What does built in support for multithreading mean?

Java provides built-in support for multithreaded programming. That is what my book says. I can do multithreaded programming in C, C++ also. So do they also provide built-in support for multithreading? What does built in support for multithreading…
pphanireddy
  • 1,109
  • 2
  • 12
  • 17
4
votes
1 answer

Each program allocates a fixed stack size? Who defines the amount of stack memory for each application running?

When we run a code, the compiler after compile "detects" the necessary amount of Stack memory? And with this, each program has its own "block" of stack memory. Or the stack memory of each program is defined by the OS? Who defines the amount of stack…
4
votes
0 answers

Why is my RISC-V trap handler called again and again?

I'm writing an operating system (supervisor mode) in Rust for RISC-V in my free time. I'm trying to handle trap now. I'm trapping correctly in direct mode, but when executing the sret instruction, I'm going directly back to my trap handler, without…
Skallwar
  • 73
  • 2
  • 5
4
votes
1 answer

How to test if address is virtual or logical in linux kernel?

I am familiar that the Linux kernel memory is usually 1:1 mapped (up to a certain limit of the zone). From what I understood is that to make this 1:1 mapping more efficient the array of struct page is virtually mapped. I wanted to check if that is…
4
votes
1 answer

Detect and wake display in OS X Lion

When the display is sleeping in Lion you can no longer wake it by moving the mouse. I need a way to programatically check if the display is sleeping, and if so wake it. Does anyone know how to do this? In the past I could just generate mouse events…
user817759
  • 111
  • 2
  • 6
4
votes
1 answer

What decides the size of virtual address space available for a process?

What is the limitation on the virtual address space available to a process ? Is it 32 bit Vs 64 bit Address bus ? 32 bit vs 64 bit Processor ? Secondary storage available ? Maximum swap space configured ? Thanks in advance
Shash316
  • 2,218
  • 18
  • 19
4
votes
2 answers

How launch any file using default program using Rust (like Python's `os.startfile()`)

Is there a rust method equivalent to os.startfile() in python. For example, I need to launch an "mp3 file" using rust. In python it is os.startfile('audio.mp3'). This will open default media player and start playing that file. I need to do the same…
Santo K. Thomas
  • 153
  • 2
  • 12
4
votes
2 answers

How does a software like Voidtools's Everything indexes more than 100k files in less than a second?

There is a software called "Everything" it indexes all the files in your machine, and find anything very fast; once the files are indexed. I would expect the index phase to take few minutes but no. it takes few seconds to index a full computer. with…
ym_wp
  • 105
  • 1
  • 8
4
votes
1 answer

How does the keyboard input get into the terminal?

Can someone describe the way how keyboard input gets on the Computer Screen?! What kind of software/hardware is involved? my question is what happens roughly or exactly when i press a key on my keyboard? what kind of software hardware is involved.…
flhe
  • 341
  • 4
  • 8
  • 15