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
5 answers

How can I access Ring 0 with Python?

This answer, stating that the naming of classes in Python is not done because of special privileges, here confuses me. How can I access lower rings in Python? Is the low-level io for accessing lower level rings? If it is, which rings I can…
hhh
  • 50,788
  • 62
  • 179
  • 282
4
votes
2 answers

Can a page fault handler generate more page faults?

I'm a bit confused about what happens when we're in user-mode and a page fault occurs. IIRC, a page fault will be generated when the TLB is attempting to map my (user-space) virtual address into a physical address and it fails. It then generates…
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
4
votes
3 answers

Creating n child process in c using fork

I found this code in geeks4geeks and i can't seem to understand it properly: #include int main() { for(int i=0;i<5;i++) // loop will run n times (n=5) { pid_t c=fork(); if(c == 0) { printf("[son]…
user11417281
4
votes
0 answers

Reading and writing bytes directly to the visible framebuffer of the OS?

There are tools like Screenshot tools, Game Macro Tools and others that can read and write pixel data directly from the visible framebuffer that is presented to the user. So there must be an API that allows one to read and possibly write directly to…
salbeira
  • 2,375
  • 5
  • 26
  • 40
4
votes
1 answer

Compiling Haiku OS for mobile devices

Is it possible for me to compile Haiku OS (a BeOS descendant) for mobile devices, for example, a phone? If yes, has anybody done it yet? Are there any examples?
wantoknow
  • 573
  • 1
  • 6
  • 15
4
votes
2 answers

Bounded-Waiting Mutual Exclusion with Compare-and-Swap

I added comments to each line to the best of my understanding, but I still don't get why we set waiting[j] = false; at the end without running process j's critical section. In my opinion, waiting[j] = false; should be replaced with i = j; so when it…
NoName
  • 9,824
  • 5
  • 32
  • 52
4
votes
1 answer

Detect Time-Stamp Counter Restriction or Availability

I want to check if the RDTSC instruction is available. There must be a Intel Pentium or newer processor and either the TSD flag in register CR4 is clear or it is set and the CPL equals 0. So, there's no problem to obtain the current privilege level…
0xbadf00d
  • 17,405
  • 15
  • 67
  • 107
4
votes
3 answers

How to effectively truncate the head of the file?

Everyone knows the truncate(file, size) function, which changes the file size to a given size, by truncating the tail of the file. But how to do the same, only with the truncation of not the tail of the file and his head?
Vyacheslav
  • 171
  • 1
  • 8
4
votes
3 answers

Reading multiple files from a same folder using python

I have thousands of text files which I want to read using python. I have successfully read one file and now I am not sure how to read multiple files using loop or any other command I tried to split the name and type of the file by saving the…
Saqib Shakeel
  • 615
  • 2
  • 8
  • 17
4
votes
2 answers

Implementation of printf() function

I'm making a hobbyist kernel and I'm trying to implement a printf() function. Here's my implementation: void kprint(uint8_t *format, ...) { va_list ap; va_start(ap, format); uint8_t *ptr; for (ptr = format; *ptr != '\0'; ptr++) { if…
msk
  • 141
  • 1
  • 3
  • 11
4
votes
1 answer

Difference between Sensitive Instructions and Privileged Instructions

I've been searching for a clear difference b/w a Sensitive and Privileged instruction but its all blurry right now. As far as i know: A sensitive instruction NEEDS TO trap to kernel mode if executed in User space else it gets ignored while a…
4
votes
1 answer

How to reboot Mac OS from C++

Possible Duplicate: Restart Mac OS X ungracefully using a C++ call? All, I am trying to reboot a Mac from my code. I find no such thing on the web. Has anyone done that?
reza
  • 5,972
  • 15
  • 84
  • 126
4
votes
1 answer

How to zip a folder in MacOS without creating an extra directory inside the zip file

I got a .zip file from my friend and it was compressed under windows, which contains three subfolders inside of it, and when I check the contents of it on my Mac terminal it looks like this: Now I unzip this file and then zip it through terminal,…
Boooooo
  • 157
  • 3
  • 12
4
votes
2 answers

How are user-level threads better than a sequential process?

What is the use of user level threads? I have read articles saying that user level threads are faster than kernel-level threads. User-level threads are non-preemptive and blocking of one user-level thread blocks all other user-level threads in the…
Vaibhav
  • 41
  • 2
4
votes
2 answers

stack vs buffer

What is the difference between buffer and stack? Is a buffer overflow and stack overflow the same thing? Thank you.
Farnaz
  • 59
  • 1
  • 3
1 2 3
99
100