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

Get OS-Version in WinRT Metro App C#

I'm programming a Metro Style App with C# and the Visual Studio 11 Beta. Now I want to get the OS-Version of the OS. How can I get this? I found out how to do it in "normal" Applications. There you take the Environment-Class with the attribute…
27
votes
6 answers

Non-blocking version of system()

I want to launch a process from within my c program, but I don't want to wait for that program to finish. I can launch that process OK using system() but that always waits. Does anyone know of a 'non-blocking' version that will return as soon as the…
Simon Hodgson
  • 563
  • 3
  • 6
  • 12
26
votes
12 answers

How do Real Time Operating Systems work?

I mean how and why are realtime OSes able to meet deadlines without ever missing them? Or is this just a myth (that they do not miss deadlines)? How are they different from any regular OS and what prevents a regular OS from being an RTOS?
Sandeep Datta
  • 28,607
  • 15
  • 70
  • 90
26
votes
3 answers

translate virtual address to physical address

The following page table is for a system with 16-bit virtual and physical addresses and with 4,096-byte pages. The reference bit is set to 1 when the page has been referenced. Periodically, a thread zeroes out all values of the reference bit.All…
Ruan
  • 397
  • 1
  • 6
  • 17
26
votes
3 answers

What is `S_ISREG()`, and what does it do?

I came across the macro S_ISREG() in a C program that retrieves file attributes. Unfortunately, there isn't any basic information about this macro online. There are some more advanced discussions on it, but they go beyond what I'm looking for. What…
The Pointer
  • 2,226
  • 7
  • 22
  • 50
26
votes
2 answers

Can a single process run in multiple cores?

can a single process run different threads on different cores? (I think they can) In that case, different cores share the same address space but with different caches? Does that mean caches will be redundant? Thanks!
user3597931
26
votes
2 answers

Is there a difference between sudo mode and kernel mode?

In a UNIX like system, we have a user mode and a kernel mode. There are some instructions which cannot be accessed in the user mode. However when we do sudo, we can access many critical sections of our OS, perform critical actions. My question is:…
sudeepdino008
  • 3,194
  • 5
  • 39
  • 73
26
votes
2 answers

fork in multi-threaded program

I've heard that mixing forking and threading in a program could be very problematic, often resulting with mysterious behavior, especially when dealing with shared resources, such as locks, pipes, file descriptors. But I never fully understand what…
jimx
  • 1,012
  • 2
  • 12
  • 12
26
votes
3 answers

TLB misses vs cache misses?

Could someone please explain the difference between a TLB (Translation lookaside buffer) miss and a cache miss? I believe I found out TLB refers to some sort of virtual memory address but I wasn't overly clear what this actually meant? I understand…
intrigued_66
  • 16,082
  • 51
  • 118
  • 189
25
votes
4 answers

What's the memory before 0x08048000 used for in 32 bit machine?

In Linux, I learned that every process stores data starting at 0x08048000 in 32 bit machine (and 0x00400000 in 64 bit machine). But I don't know the reason why starting from there. What's the memory before 0x08048000 used for? Update: Some people…
Mu Qiao
  • 6,941
  • 1
  • 31
  • 34
25
votes
13 answers

Is it possible to code a device driver in Java?

Introduction I heard something about writing device drivers in Java (heard as in "with my ears", not from the internet) and was wondering... I always thought device drivers operated on an operating system level and thus must be written in the same…
Philip Stark
  • 598
  • 1
  • 4
  • 12
25
votes
1 answer

sh return: can only `return' from a function or sourced script

return statement error:urn: can only `return' from a function or sourced script in shell script myscript.sh #!/bin/bash if [ $# -ne 2 ] then echo "Incorrect Usage : Arguments mismatch." return 2 fi mv $1 $2 return 0 When i try to run sh…
karthi keyan
  • 251
  • 1
  • 3
  • 3
25
votes
7 answers

How can I return system information in Python?

Using Python, how can information such as CPU usage, memory usage (free, used, etc), process count, etc be returned in a generic manner so that the same code can be run on Linux, Windows, BSD, etc? Alternatively, how could this information be…
davidmytton
  • 38,604
  • 37
  • 87
  • 93
25
votes
14 answers

Best OS for java development?

What is the best OS for Java development? People from Sun are pushing the Solaris, yes Solaris have some extra features included in itself such as (dTrace, possibility for Performance tuning the JVM, etc.. ). Some friends of mine, had port their…
vaske
  • 9,332
  • 11
  • 50
  • 69
25
votes
4 answers

Convert physical address to virtual in Linux and read its content

I have Linux and I have a physical address: (i.e. 0x60000000). I want to read this address from user-space Linux program. This address might be in kernel space.
Mikhail Kalashnikov
  • 1,146
  • 1
  • 11
  • 31