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
55
votes
3 answers

what is the use of SPL (secondary program loader)

I am confused in clearing my concepts regarding these three questions why do we need a secondary program loader ? in which memory it gets loaded and relocated ? what is the difference between system internal memory and RAM ? as far as I…
theadnangondal
  • 1,546
  • 3
  • 14
  • 28
55
votes
9 answers

What is thrashing? Why does it occur?

In an operating system, thrashing is something related to memory management. Why does thrashing occur? How can we prevent it? I checked Wikipedia (but I need some simple understanding).
user2803850
55
votes
2 answers

Is it true that fork() calls clone() internally?

I read in the 3rd chapter of the "Linux Kernel Development, Second Edition" by Robert Love (ISBN:0-672-32720-1) that the clone system call is used to create a thread in Linux. Now the syntax of clone is such that a starting routine/function address…
0xF1
  • 6,046
  • 2
  • 27
  • 50
54
votes
4 answers

How does multi-level page table save memory space?

I am trying to understand how multi-level page table saves memory. As per my understanding, Multi-level page table in total consumes more memory than single-level page table. Example : Consider a memory system with page size 64KB and 32-bit…
Anil Kumar K K
  • 1,395
  • 1
  • 16
  • 27
54
votes
22 answers

What is process and thread?

Yes, I have read many materials related to operating system. And I am still reading. But it seems all of them are describing the process and thread in a "abstract" way, which makes a lot of high level elabration on their behavior and logic…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
53
votes
2 answers

Does every process have its own page table?

Does every process have its own page table or does it simply add it's page entries into one big page table?
53
votes
3 answers

Monitor vs Mutex

I read that mutex is a semaphore with value 1 (binary semaphore) used to enforce mutual exclusion. I read this link Semaphore vs. Monitors - what's the difference? which says that monitor helps in achieving mutual exclusion. Can someone tell me the…
Zephyr
  • 1,521
  • 3
  • 22
  • 42
53
votes
3 answers

how can i search for files and zip them in one zip file

I tried to search files and zip them with the following commmand find . regexpression -exec zip {} \; however it is not working. How can i do this?
LOGAN
  • 1,025
  • 2
  • 10
  • 14
50
votes
6 answers

Why does this small Java program make MacOS restart?

Code is as follows Set threads = new HashSet<>(); Runnable r = () -> { try { Thread.sleep(Long.MAX_VALUE); } catch (InterruptedException e) { e.printStackTrace(); } }; for (int i = 0; i < 20000; i++) { …
Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
50
votes
10 answers

Determine the OS version, Linux and Windows from Powershell

How can I determine the OS type, (Linux, Windows) using Powershell from within a script? The ResponseUri isn't recognised when this part of my script is ran on a Linux host. $UrlAuthority = $Request.BaseResponse | Select-Object -ExpandProperty…
boomcubist
  • 770
  • 1
  • 7
  • 15
50
votes
5 answers

Git core.autocrlf line ending default setting

I'm trying to figure out what is the default value for core.autocrlf in Git if the user doesn't change this setting. I've looked in the docs but can't find this info. Can you please point me in the right direction? Specifically, on a fresh Git…
Pensierinmusica
  • 6,404
  • 9
  • 40
  • 58
50
votes
3 answers

The difference between Call Gate, Interrupt Gate, Trap Gate?

I am studying Intel Protected Mode. I found that Call Gate, Interrupt Gate, Trap Gate are almost the same. In fact, besides that Call Gate has the fields for parameter counter, and that these 3 gates have different type fields, they are identical in…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
50
votes
4 answers

Detecting Operating Systems in Ruby

Is there a way to detect the operating system in ruby? I am working on developing a sketchup tool that will need to detect Mac vs. Windows.
user1546594
  • 539
  • 1
  • 4
  • 4
49
votes
1 answer

What is kthreadd process and children and how it is different from init and children

I wanted to know what is kthread and why it does not take any memory and has no open files. I wrote some code which will simply print the PID of the currently running processes in a parent child tree format along with some additional information…
phoxis
  • 60,131
  • 14
  • 81
  • 117
49
votes
5 answers

What happens in OS when we dereference a NULL pointer in C?

Let's say there is a pointer and we initialize it with NULL. int* ptr = NULL; *ptr = 10; Now , the program will crash since ptr isn't pointing to any address and we're assigning a value to that , which is an invalid access. So , the question is ,…
h4ck3d
  • 6,134
  • 15
  • 51
  • 74