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

Get file separator in Fortran

Could you please tell me how to get the file separator of current operating system, for example \ in Windows and / in Unix, in Fortran at run-time.
4
votes
1 answer

How to load kernel into memory from CD-ROM using Assembly (NASM)

I'm writing a bootstrap and kernel for myself and both bootstrap and kernel will be burn on a CD-R and will function as a CD-live. It is not a linux CD-Live or something else,is totally my own bootloader and kernel. I do not want to use other…
Pooria
  • 780
  • 1
  • 8
  • 17
4
votes
1 answer

Write system call writes data to disk directly?

I've read couple of questions(here) related to this but I still have some confusion. My understanding is that write system call puts the data into Buffered Cache(OS caches as referred in that question). When the Buffered Cache gets full it is…
FourOfAKind
  • 2,298
  • 5
  • 31
  • 34
4
votes
4 answers

Is this program running Asynchronous or synchrounous?

When I run this program OVERLAPPED o; int main() { .. CreateIoCompletionPort(....); for (int i = 0; i<10; i++) { WriteFile(..,&o); OVERLAPPED* po; GetQueuedCompletionStatus(..,&po); } } it seems that…
user53670
4
votes
5 answers

How do we shift from protected mode to real mode in Linux 2.6?

How do we shift from protected mode to real mode in Linux 2.6?
setzamora
  • 3,560
  • 6
  • 34
  • 48
4
votes
1 answer

Hibernate an entire process in Windows

It is possible, to save an entire process to a file, in order to restore it into a memory after system reboot, causing it to return to a running state? If a process is a set of WinAPI calls that are in binary code of an executable file, and the…
Maxim V. Pavlov
  • 10,303
  • 17
  • 74
  • 174
4
votes
1 answer

Is access to heap section of parent process by child process (created by fork() ) legal?

Can a child process access(read and write) parent process's heap address space? Following is the program i tried at http://www.ideone.com/R5vDT which is running successfully: int main(){ int *p = (int*)malloc(sizeof(int)); …
monish001
  • 671
  • 2
  • 8
  • 20
4
votes
2 answers

python os.path.join on windows ignores first path element?

Consider the following: >>> from django.conf import settings >>> import os >>> settings.VIRTUAL_ENV 'C:/Users/Marcin/Documents/oneclickcos' >>> settings.EXTRA_BASE '/oneclickcos/' >>>…
Marcin
  • 48,559
  • 18
  • 128
  • 201
4
votes
1 answer

Getting the OS Animation preferences in Java

I have a Java app whose windows and internal components have animations that could slow down a less powerful computer. I know that all OSs have some form of animation preferences (In Windows, there are check boxes for "Animate controls and elements…
Ky -
  • 30,724
  • 51
  • 192
  • 308
4
votes
0 answers

How to protect your github code against being used for llm training

The recent rise of LLMs trained on vast amounts of data, including OS repositories, leads to a licensing question. Suppose you are OK for other human developers to build on your code but do not want to allow the likes of OpenAI to use your code for…
4
votes
1 answer

Best practice for typedef'ing structs?

I've gone down a rabbit hole of questions about typedef, tag and struct namespaces, and leading _ being reserved by either the system libraries or the compilers. My question: What is the best practice for typedef'ing structs? For example, here are…
user129393192
  • 797
  • 1
  • 8
4
votes
2 answers

Can we use one variable - turn only in Peterson's solution?

Here is the Peterson's solution presented in our lecture: //P0: do { flag[0] = TRUE; turn = 1; while(flag[1] && turn == 1); //Critical section flag[0] = FALSE; //remainder section } while(1) //P1: do { flag[1] = TRUE; turn = 0; …
4
votes
5 answers

How to output a directory tree as HTML?

Here's what I've got so far: project_dir = '/my/project/dir' project_depth = len(project_dir.split(os.path.sep)) xml_files = [] for dirpath, dirnames, filenames in os.walk(project_dir): for filename in fnmatch.filter(filenames, '*.xml'): …
mpen
  • 272,448
  • 266
  • 850
  • 1,236
4
votes
1 answer

Python MacOS Loop Files Get File Info

I am trying to loop through all mp3 files in my directory in MacOS Monterrey and for every iteration get the file's more info attributes, like Title, Duration, Authors etc. I found a post saying use xattr, but when i create a variable with xattr it…
Jorge
  • 336
  • 1
  • 4
  • 15
4
votes
0 answers

Is it possible to load x86 linear address with LEA-like instruction?

Background: I am using x86's GS register to store the base linear address of (more precisely, the segment selector to) the per-CPU data area (much like the trick used in Linux). There is a need to load the pointers (linear addresses) of the per-CPU…