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
5
votes
1 answer

Kernel Code vs User Code

Here's a passage from the book When executing kernel code, the system is in kernel-space execut- ing in kernel mode.When running a regular process, the system is in user-space executing in user mode. Now what really is a kernel code and user…
Kraken
  • 23,393
  • 37
  • 102
  • 162
5
votes
2 answers

What is the significance of the initial value of a semaphore?

A semaphore is a mechanism for avoiding race conditions. But what's the significance of the initial value of a semaphore? Say that a semaphore has an initial value of 5, is it that 5 processes can access some shared resource simultaneously?
freenight
  • 1,069
  • 3
  • 13
  • 19
5
votes
2 answers

Multiple process vs Multiple threads for CPU intensive and IO intensive processes on server

I have a server with say, 16 cores and 32G memory. For a process like apache, which spawns a new thread for every new connection which of the following alternatives is better, and why? Also what will happen in the case of an application like…
Swair
  • 1,503
  • 2
  • 15
  • 27
5
votes
5 answers

Data section in a.out

here is a simple code that I executed int a; int main() { return 0; } Then after compiling with gcc I did size a.out I got some output in bss and data section...Then I changed my code to this int a; int main() { char *p = "hello"; …
user1205088
  • 229
  • 2
  • 11
5
votes
2 answers

How do I compile libnoise on Mac OS X Mountain Lio

I am new to the Mac OS X environment when it comes to compiling linux based libraries. Whenever I used a library i just downloaded the .framework file, added it to my /Library/Frameworks and included it in my XCODE project, and all was fine. Now I…
5
votes
2 answers

sleep() vs blocking of a process

I get confused with the sleep(), blocking call, preemption concept very often. As I understand preemption is completely done by the scheduler irrespective of what the process was doing. Except when the process is in some critical section or…
Nike
  • 455
  • 1
  • 5
  • 16
5
votes
9 answers

What is INT 21h?

Inspired by this question How can I force GDB to disassemble? I wondered about the INT 21h as a concept. Now, I have some very rusty knowledge of the internals, but not so many details. I remember that in C64 you had regular Interrupts and Non…
Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
5
votes
1 answer

how to intercept calls to the file systems

I am interested in intercepting all system calls related to the file system and instead having my own code run. For example, calls to creat, write, close, lseek, getcwd, etc. My goal is to create a function like execve that captures all file I/O…
qsc
  • 494
  • 4
  • 12
5
votes
2 answers

How to Detect Mac OS X Version in JavaScript

I have scoured everywhere on the internet as to how to detect the OS and it's version. I have found out how to do it for windows, (see code below), and now I want it to work for Mac too. Windows detection code (works perfectly!): // OS detection var…
ModernDesigner
  • 7,539
  • 10
  • 34
  • 41
5
votes
2 answers

Do other operating systems implement the Linux system call splice?

In an application I am developing I use splice on Linux for socket-to-socket data transfer. Do other operating systems (specifically at least Windows, OS X and FreeBSD) implement splice or an equivalent solution? Is it possible to imitate…
Cetin Sert
  • 4,497
  • 5
  • 38
  • 76
5
votes
3 answers

How do computers prevent programs from interfering with each other?

For example, I heard in class that global variables are just put in a specific location in memory. What is to prevent two programs from accidentally using the same memory location for different variables? Also, do both programs use the same stack…
i love stackoverflow
  • 1,555
  • 3
  • 12
  • 24
5
votes
3 answers

Fast input output function

#define getcx getchar_unlocked inline void inp( int &n )//fast input function { n=0; int ch=getcx();int sign=1; while( ch < '0' || ch > '9' ){if(ch=='-')sign=-1; ch=getcx();} while( ch >= '0' && ch <= '9' ) n = (n<<3)+(n<<1)…
user1205088
  • 229
  • 2
  • 11
5
votes
3 answers

Is assembly strictly required to make the "lowest" part of an operating system?

Im a mid-level(abstraction) programmer, and some months ago i started to think if i should reduce or increase abstraction(i've chosen to reduce). Now, i think i've done most of the "research" about what i need, but still are a few questions…
SOMN
  • 351
  • 1
  • 3
  • 15
5
votes
2 answers

Is kernel a special program that executes always? and why are these CPU modes?

I am new to this OS stuff. Since the kernel controls the execution of all other programs and the resources they need, I think it should also be executed by the CPU. If so, where does it gets executed? and if i think that what CPU should execute is…
nitish712
  • 19,504
  • 5
  • 26
  • 34
5
votes
5 answers

How to change the format of a path string to a different OS?

I need to change a file path from MAC to Windows and I was about to just do a simple .replace() of any / with \ but it occurred to me that there may be a better way. So for example I need to change: foo/bar/file.txt to: foo\bar\file.txt
jonathan topf
  • 7,897
  • 17
  • 55
  • 85