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

Android: Is there a PC port?

Is it possible to have Android running on x86 computers?
prinzdezibel
  • 11,029
  • 17
  • 55
  • 62
4
votes
1 answer

Multiprocessing in python3 get different values when running on mac and linux

Multiprocessing in Python 3 get different values when running on Mac and Linux. For example, when forking the variable values in the main process should be cloned to the child process. But after testing, Linux's result is different from Mac. Here is…
4
votes
1 answer

Memory size feasible via Virtual Memory vs RAM

I am trying to instantiate a huge ArrayList List list = new ArrayList(Integer.MAX_VALUE); Running it in eclipse I get: java.lang.OutOfMemoryError: Requested array size exceeds VM limit If I do: List list = new…
Jim
  • 3,845
  • 3
  • 22
  • 47
4
votes
1 answer

Why syscall/sysret in legacy mode is considered "sufficiently poorly designed"?

See comments in https://github.com/torvalds/linux/blob/master/arch/x86/entry/entry_64_compat.S I understand that because 32-bit syscall/sysret doesn't save/restore ESP, it's necessary to handle NMI in a task gate to ensure a good stack pointer.…
4
votes
1 answer

what is the difference between uuid4 and secrets token_bytes in python?

Checked the cpython source code for both secrets and uuid4. Both seems to be using os.urandom. #uuid.py def uuid4(): """Generate a random UUID.""" return UUID(bytes=os.urandom(16), version=4) #secrets.py def token_bytes(nbytes=None): …
void
  • 2,571
  • 2
  • 20
  • 35
4
votes
2 answers

Can't link c++ function in assembly

Sorry if there are other questions like this one, but I tried almost everything with no results. I have an assembly file calling the main function of a cpp file(I'm making a kernel entry) kerne.asm [bits 32] [extern _main] jmp…
frgr
  • 43
  • 3
4
votes
0 answers

Where are Python file buffers stored?

Recently implemented a file format API and was wondering why the file size wasn't updating until close(). Did some searching and found that the content is written to a buffer until close() is called. I wanted to see if I could update the file size…
pstatix
  • 3,611
  • 4
  • 18
  • 40
4
votes
1 answer

What pitfalls should I be wary of when memory mapping BIG files?

I have a bunch of big files, each file can be over 100GB, the total amount of data can be 1TB and they are all read-only files (just have random reads). My program does small reads in these files on a computer with about 8GB main memory. In order to…
marcorossi
  • 1,941
  • 2
  • 21
  • 34
4
votes
1 answer

Porting the python interpreter to a custom operating system

I am looking for resources that I could go through to port the python interpreter to a custom OS (with an implementation similar to DOS but not DOS itself). What are some important points I should keep in mind? Is the complete port of python…
Vijay
  • 924
  • 7
  • 14
4
votes
1 answer

Why do I get the wrong address when referencing a global variable?

I am trying to write a basic OS to better understand OS fundamentals and I am running into a strange problem. After switching to protected mode I jump into my kernel. In my kernel.cpp file I declare the following global variables (where…
4
votes
2 answers

Can the threads of the same process run on different core?

Can the threads spawned by a process run on different cores of a multicore system? Let's say I have a process P from which I have spawned two threads t1 and t2 and it's a multicore system with two cores C1 and C2. My questions are: Can the treads…
aja
  • 129
  • 1
  • 11
4
votes
1 answer

Python: Get current working directory from terminal

Hello I'm writing a small script which will make a webbsite template for me. I'm going to make an alias which would run the script and thats why I have a problem. When running the script, I don't want to write a directory to where I want to create…
Alex_Joo
  • 111
  • 2
  • 7
4
votes
1 answer

Golang os.Create path with nested directories

As mentioned in GoDocs, os.Create() creates a file in specific path. os.Create("fonts/foo/font.eot") But when fonts or foo doesn't exists, it returns panic: open fonts/foo/font.eot: The system cannot find the path specified. So i used os.MkdirAll()…
Exind
  • 417
  • 1
  • 6
  • 12
4
votes
1 answer

How to detect the OS and CPU architecture of a remote SSH server

I have a program that connects to a remote machine via SSH. I want to upload and run a binary on that machine. In order to do that I need to know what OS it is (I will support Linux, Mac and probably Windows), and what CPU architecture (I will…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
4
votes
1 answer

Why are all environment variables loaded into the stack of a process?

I am exploring a simple ELF binary with gdb on my machine right now. If I see correctly, all environment variables are loaded into the stack of the process. I am assuming that they are provided to user applications in case they are needed by the…
Alexander Grass
  • 384
  • 2
  • 11