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

Permission denied (Errno 13) - wandb init - In docker container

I am running a docker container on a cluster where I try to run an open source code : https://github.com/xinntao/BasicSR. However I encounter the following error: As I can see it's the package wandb that creates the error when…
Drago
  • 43
  • 2
  • 6
4
votes
4 answers

Can a blocked thread be rescheduled to do other work?

If I have a thread that is blocked waiting for a lock, can the OS reschedule that thread to do other work until the lock becomes available? From my understanding, it cannot be rescheduled, it just sits idle until it can acquire the lock. But it just…
alfer
  • 355
  • 2
  • 8
4
votes
2 answers

Eliding cache snooping for thread-local memory

Modern multicore CPUs synchronize cache between cores by snooping, i.e. each core broadcasts what it is doing in terms of memory access, and watches the broadcasts generated by other cores, to cooperate in making sure writes from core A are seen by…
4
votes
1 answer

Good books or resources for understanding OS, kernel and CPU architectures

I need to learn the basic knowledge of OS, kernel and CPU architectures since some jobs do require those background. Is there a good book or online resource that I can refer to.
q0987
  • 34,938
  • 69
  • 242
  • 387
4
votes
2 answers

Open file in append mode by multiple process

AFAIK each process will maintain separate file table (correct me if my understanding is wrong). So for example same file is opened in APPEND mode by multiple processes at time and each process is writing some data to the file. It gets appended at…
CrazyCoder
  • 2,465
  • 8
  • 36
  • 57
4
votes
2 answers

How come the stack cannot be increased during runtime in most operating system?

Is it to avoid fragmentation? Or some other reason? A set lifetime for a memory allocation is a pretty useful construct, compared to malloc() which has a manual lifetime.
Olle Härstedt
  • 3,799
  • 1
  • 24
  • 57
4
votes
0 answers

How to get CPU usage on Mac OS X (not use top command)

I need to collect for CPU usage oftentimes, and the top command costs lots of time (top -F -R -l 1). I also try "sysctl" and "sysctlbyname" but below functions cannot get CPU usage. So, if there is any API or command line
Owen Kao
  • 41
  • 3
4
votes
5 answers

Explanation for Why int should be preferred over long/short in c++?

I read somewhere that int data type gives better performance (as compared to long and short) regardless of the OS as its size gets modified according to the word size of the OS. Where as long and short occupy 4 and 2 bytes which may or may not match…
Nitin Garg
  • 2,069
  • 6
  • 25
  • 50
4
votes
0 answers

Raspberry pi 64 bit Os showing Unable to locate package libjasper-dev. how to fix this?

I am using a raspberry pi 4. And I installed a 64-bit (not 32-bit) Raspberry Pi OS. When I tried to install libjasper-dev using the command 'sudo apt-get install libjasper-dev' as a part of OpenCV. It is showing "Unable to locate package…
Savad
  • 1,240
  • 3
  • 21
  • 50
4
votes
4 answers

Does printing to the screen cause a switch to kernel mode and running OS code in Unix?

i'm studying for a test is OS (unix is our model). i have the following question: which of the following 2 does NOT cause the user's program to stop and to switch to OS code? A. the program found an error and is printing it to the screen. B.…
Asher Saban
  • 4,673
  • 13
  • 47
  • 60
4
votes
1 answer

what is this code result? and why is like that?

What is the reason for the code result? And what happens when an exception happens in the fork()? #include #include #include #include int main(){ int pid=fork(); if(pid==0){ int…
4
votes
2 answers

How can I specify dependencies on operating system in Python Poetry?

If I want to develop a Python package which works only in Linux and macOS. How do I specify this restriction in Python Poetry?
Benjamin Du
  • 1,391
  • 1
  • 17
  • 25
4
votes
1 answer

per process page table: what happens when a page frame is sent to disk?

My understanding is that, in general, there is one page table per process. My question is then: what happens in case of a page fault of the running process, if the OS has to send a page frame of a non-running process back to disk. The page table of…
Raphinou
  • 95
  • 6
4
votes
2 answers

IPC through writing into files?

I have a question about Inter-process-communication in operating systems. Can 2 processes communicate with each other by both processes opening the same file (which say was created before both processes, so both processes have the file handler) and…
xyz
  • 8,607
  • 16
  • 66
  • 90
4
votes
3 answers

Copy and move's command effect on inode

I interpret inode as a pointer to the actual place where the file is stored. But I have problem understanding: If I use cp file1 file2 in a place where file2 already exists, the inode doesn't change. And If there is originally a hard-link to file2,…
Gabriel
  • 77
  • 1
  • 7