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

Available and used System Memory in Python?

How can I get the available and currently used memory from Python? It need to be cross-platform and at least work on at least Windows, Mac OS X and Linux. I'd like to report the user in my application that there isn't enough memory free to proceed.
Johan Dahlin
  • 25,300
  • 6
  • 40
  • 55
85
votes
5 answers

What is the return value of os.system() in Python?

I came across this: >>> import os >>> os.system('ls') file.txt README 0 What is return value of os.system()? Why I get 0?
user813713
85
votes
5 answers

Is Mac OS X a POSIX OS?

What is it that makes an OS a POSIX system? All versions of Linux are POSIX, right? What about Mac OS X?
node ninja
  • 31,796
  • 59
  • 166
  • 254
84
votes
1 answer

What are atomic operations for newbies?

I am a newbie to operating systems and every answer I've found on Stackoverflow is so complicated that I am unable to understand. Can someone provide an explanation for what is an atomic operation For a newbie? My understanding: My understanding…
83
votes
1 answer

Why was the comment that said "Don't format a floppy at the same time" funny when talking about threads and processes?

I was reading up the difference between Thread and Processes and came across the comment left by users in the second answer which stated As so long as you don't format a floppy at the same time. It has 27 upvotes but no one has explained the…
Computernerd
  • 7,378
  • 18
  • 66
  • 95
81
votes
3 answers

Why is Windows 32-bit called Windows x86 and not Windows x32?

The Windows operating system can be either 32 bit or 64 bit. The 64 bit version is called Windows x64 but the 32 bit version is called Windows x86. Why isn't it called Windows x32? What is the reason?
Bacteria
  • 8,406
  • 10
  • 50
  • 67
81
votes
6 answers

List Directories and get the name of the Directory

I am trying to get the code to list all the directories in a folder, change directory into that folder and get the name of the current folder. The code I have so far is below and isn't working at the minute. I seem to be getting the parent folder…
chrisg
  • 40,337
  • 38
  • 86
  • 107
81
votes
8 answers

When is a condition variable needed, isn't a mutex enough?

I'm sure mutex isn't enough that's the reason the concept of condition variables exist; but it beats me and I'm not able to convince myself with a concrete scenario when a condition variable is essential. Differences between Conditional variables,…
81
votes
10 answers

What is the difference between a stack overflow and buffer overflow?

What is the difference between a stack overflow and a buffer overflow in programming?
joe
  • 34,529
  • 29
  • 100
  • 137
80
votes
2 answers

Why is the CPU not needed to service I/O requests?

I am learning about operating systems but there is a small concept I cannot grasp. Say a process 1 is running on the CPU and then it issues an I/O request to read from a disk. For efficiency, the CPU begins executing process 2 as this request is…
Pat Murray
  • 4,125
  • 7
  • 28
  • 33
79
votes
6 answers

which one should I use: os.sep or os.path.sep?

They are same, but which one should I use? http://docs.python.org/library/os.html: os.sep The character used by the operating system to separate pathname components. This is '/' for POSIX and '\' for Windows. Note that knowing this is not…
zhigang
  • 6,597
  • 4
  • 30
  • 24
79
votes
7 answers

What is the meaning of *nix?

What is the meaning of *nix, and what is its relation with Ruby? Just saw that in an interview question... I think there is something to do with UNIX distros, but I am not sure. Could not find it here or in the Wikipedia, so I am asking. What is the…
Cristiano Fontes
  • 4,920
  • 6
  • 43
  • 76
79
votes
11 answers

What is priority inversion?

I've heard the phrase 'priority inversion' in reference to development of operating systems. What exactly is priority inversion? What is the problem it's meant to solve, and how does it solve it?
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
78
votes
10 answers

Best way to find the OS name and version on a Unix/Linux platform

I need to find the OS name and version on a Unix/Linux platform. For this I tried the following: lsb_release utility /etc/redhat-release or specific file But it does not seem to be the best solution, as LSB_RELEASE support is no longer for RHEL…
Niraj Nandane
  • 1,318
  • 1
  • 13
  • 24
77
votes
5 answers

DNS caching in Linux

I am confused about DNS caching. I am writing a small forward proxy server and want to use the OS DNS cache on a Linux system. If I understand correctly, there is DNS caching at the browser level. Then there is DNS caching at the OS level (Windows…
agent.smith
  • 9,134
  • 9
  • 37
  • 49