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
111
votes
8 answers

Get operating system info

I recently started wondering about sites like http://thismachine.info/ that get the user's operating system info. I have not been able to find out how to do that with PHP, and wanted to try to figure it out. I noticed that they list the user-agent,…
pattyd
  • 5,927
  • 11
  • 38
  • 57
101
votes
4 answers

dup2 / dup - Why would I need to duplicate a file descriptor?

I'm trying to understand the use of dup2 and dup. From the man page: DESCRIPTION dup and dup2 create a copy of the file descriptor oldfd. After successful return of dup or dup2, the old and new descriptors may be used interchangeably. They share…
JAN
  • 21,236
  • 66
  • 181
  • 318
95
votes
11 answers

How can I find which operating system my Ruby program is running on?

I want my Ruby program to do different things on a Mac than on Windows. How can I find out on which system my program is running?
Huluk
95
votes
10 answers

Java get available memory

Is there any good way to get the remaining memory available to the JVM at run time? The use case of this would be to have web services which fail gracefully when they are nearing their memory limits by refusing new connections with a nice error…
Li Haoyi
  • 15,330
  • 17
  • 80
  • 137
93
votes
9 answers

Unable to use xcodebuild on Mavericks with Command Line Tools installed

I have installed the Command Line Tools: $ xcode-select --print-path /Library/Developer/CommandLineTools However, when anything tries to use xcodebuild, I get the following error: $ /usr/bin/xcodebuild xcode-select: error: tool 'xcodebuild'…
user1082754
93
votes
5 answers

Difference between user-level and kernel-supported threads?

I've been looking through a few notes based on this topic, and although I have an understanding of threads in general, I'm not really to sure about the differences between user-level and kernel-level threads. I know that processes are basically made…
Cail Demetri
  • 2,138
  • 3
  • 22
  • 24
92
votes
8 answers

Locking Executing Files: Windows does, Linux doesn't. Why?

I noticed when a file is executed on Windows (.exe or .dll), it is locked and cannot be deleted, moved or modified. Linux, on the other hand, does not lock executing files and you can delete, move, or modify them. Why does Windows lock when Linux…
David Lenihan
  • 921
  • 1
  • 7
  • 3
91
votes
5 answers

What's the difference between "virtual memory" and "swap space"?

Can any one please make me clear what is the difference between virtual memory and swap space? And why do we say that for a 32-bit machine the maximum virtual memory accessible is 4 GB only?
algo-geeks
  • 5,280
  • 10
  • 42
  • 54
91
votes
5 answers

Call to operating system to open url?

What can I use to call the OS to open a URL in whatever browser the user has as default? Not worried about cross-OS compatibility; if it works in linux thats enough for me!
Bolster
  • 7,460
  • 13
  • 61
  • 96
91
votes
14 answers

How does Software/Code actually communicate with Hardware?

My question is: When I press the "Shut down" button in Windows/Linux,the computer shuts down. How did the command "Shut down" actually make the computer Physically shutdown? To make my point clear: When we kick a ball,there is physical contact…
AbyJames
  • 911
  • 1
  • 7
  • 3
90
votes
4 answers

How to make parent wait for all child processes to finish?

I'm hoping someone could shed some light on how to make the parent wait for ALL child processes to finish before continuing after the fork. I have cleanup code which I want to run but the child processes need to have returned before this can…
Donatello
  • 947
  • 1
  • 7
  • 6
89
votes
3 answers

Difference between C standard library and C POSIX library

I'm a little confused by "C standard lib" and "C POSIX lib", because I found that, many header files defined in "C POSIX lib" are also part of "C standard lib". So, I assume that, "C standard lib" is a lib defined by ANSI C organization, and there…
Alcott
  • 17,905
  • 32
  • 116
  • 173
89
votes
3 answers

Find Process Name by its Process ID

Suppose I know the process ID. I want to find the process name by its ID, using windows batch script. How can I do this?
Oz Molaim
  • 2,016
  • 4
  • 20
  • 29
89
votes
12 answers

Detect 64-bit or 32-bit Windows from User Agent or Javascript?

I want to offer the right version of a download. The versions I have are: 32-bit Windows 64-bit Windows Linux Detecting Linux using the User Agent field is easy; but is it possible to reliably figure out if Windows is 32-bit or 64-bit? Users…
user9876
  • 10,954
  • 6
  • 44
  • 66
88
votes
3 answers

What is TLB shootdown?

What is a TLB shootdown in SMPs? I am unable to find much information regarding this concept. Any good example would be very much appreciated.
mousey
  • 11,601
  • 16
  • 52
  • 59