12 votes
Accepted

What is the real advantage of Google's new Fuchsia operating system kernel?

From what I understand you are asking what are the technical benefits of zircon over linux? First of all zircon is a micro kernel as opposed to the linux monolithic kernel. So lets look at some of ...
Oxygen's user avatar
  • 136
7 votes

If I write code in machine language, then I have access to the CPU in both modes (user and kernel), since the OS is bypassed, correct?

No. The Operating System is going to use context switching and virtual memory to hide the fact that there are multiple processes running on the computer. Native code does not mean you have full ...
Yuxuan Chen's user avatar
6 votes
Accepted

User level threads are transparent to the kernel?

As, the linked answers and the explanations provided by your textbooks describe that, user level threads are transparent to the kernel, yes they are indeed. Kernel Level threads are not transparent ...
azam's user avatar
  • 429
6 votes

What is a file?

According to Wikipedia, a computer file is simply a resource for storing information. The term appears to have originated in the punch card era, where a computer program was literally stored in a file ...
phyrfox's user avatar
  • 171
5 votes

Performance of microkernel vs monolithic kernel

I prefer to call Windows NT and Apple's XNU kernel monolithic instead of hybrid. I don't find the classification of hybrid to have much meaning in practice. In fact one of the original engineers of ...
Ironlenny's user avatar
  • 151
5 votes

What is the difference between user-level threads and kernel-level threads?

Think of kernel level threads as "virtual processors" and user level threads as simply threads (Let's call them as such for now). Now, for a thread to be executed, it has get assigned on to a ...
azam's user avatar
  • 429
5 votes
Accepted

Question about Context Switching

What I think is meant by "kernel registers" in this context is any values that are stored in registers within the kernel itself. Note: In what follows, I'm going to talk about what happens ...
Pseudonym's user avatar
  • 21.3k
4 votes

how applications send tcp data to internet?

Applications don't deal with TCP packets at all. The operating system presents an interface somewhat similar to the file system and the application just writes data to that interface. The OS deals ...
David Richerby's user avatar
4 votes
Accepted

Why do we try to maximize Lagrangian in SVMs?

I think the answer to this deals with convex functions and duality. $$L(w, b, \alpha) = \frac{1}{2}\|w\|^2 + \sum_i α_i(y_i(w \bullet x+b)-1).$$ When you minimize this, you are minimizing it over $...
MadhavanRP's user avatar
4 votes

Why doesn't everyone use microkernel-based operating systems?

Yes, you use microkernel operating systems. If you use a modern Intel CPU, it includes a copy of Minix which runs on a separate processor that is embedded in the processor that you think you have. ...
Pseudonym's user avatar
  • 21.3k
3 votes
Accepted

A microkernel fully hardcoded in hardware?

The key search terms here are FPGA and ASIC, since at this point the OS is no longer running on instructions executed by a CPU in the conventional sense. Here is a relevant result I found with a ...
Aaron Rotenberg's user avatar
3 votes
Accepted

Is it possible for a syscall to pack together different places in memory?

No, that isn't possible in general, because the page tables work at a page granularity. If the length of every buffer is an exact multiple of the page table size, and every buffer starts at a page ...
D.W.'s user avatar
  • 154k
3 votes
Accepted

Can User Level Thread read/write Kernel thread?

No. In most operating systems, kernel memory is protected using virtual memory mechanisms, so a user process cannot read or write to kernel memory. A user thread is part of a user process, and has ...
D.W.'s user avatar
  • 154k
3 votes
Accepted

Paging only for user code. What about kernel code?

Other than the fact that kernels tend to be small, as Yuval points out, you should also consider that they are often not relocatable code (in fact, address binding for kernels is done at compile-time) ...
Acsor's user avatar
  • 342
3 votes
Accepted

How were operating systems even made?

There is some great mysticism around Operating Systems. They are sometimes treated like this dark wizardry that only a handful of the initiated are allowed to understand. (Compilers are treated like ...
Jörg W Mittag's user avatar
3 votes

Isn't a small monolithic kernel a micro-kernel, and a big micro-kernal a monolithic kernel?

The distinction between monolithic kernels and microkernels has nothing to do with the size. In a monolithic kernel, all services are provided by a single piece of code running in a single, flat, ...
Jörg W Mittag's user avatar
3 votes

OS: Why is it necessary to have hardware support for implementing Preemptive Scheduling Strategies?

A preemptive scheduler must stop a program that is looping and not calling any operating system function. The program is not triggering any fault as division by zero. We are assuming that the ...
Christian Gingras's user avatar
3 votes

How are kernels (and operating systems in general) written in C?

Today, you can definitely write an OS in C because you have compilers readily available on some OSes. You just have to decide with what executable format you are going to go and then parse it from a ...
user123's user avatar
  • 1,092
3 votes

How are kernels (and operating systems in general) written in C?

There's a lot to unpack here, but I'll try to keep it as Computer Science as I can. Am I right in thinking that fork, malloc, etc. are wrapper methods that call the Kernel? Yes and no, respectively. ...
Pseudonym's user avatar
  • 21.3k
3 votes
Accepted

(reference) Where can I learn more about I/O operations in OS?

It is pretty complex because there are several layers between the actual hard-disk and the software implementation of sockets. In today's x86 computers, the actual hard-disk is read using the Intel's ...
user123's user avatar
  • 1,092
3 votes
Accepted

What happens if there is context switch while executing system call?

If the kernel decides to do a context switch, it's in response to some event which caused the processor to enter kernel mode. This can be either a system call or an interrupt (which can be a timer ...
Gilles 'SO- stop being evil''s user avatar
3 votes
Accepted

How does caching, paging, virtual memory, and OS all tie together for UNIX copy-on-write?

It seems like your understanding of the matter is pretty good. You are just missing one tiny trick: Make the pages read-only. When the OS forks the process, it maps ...
Jörg W Mittag's user avatar
2 votes
Accepted

Are process-safe mutexes shared between OSes?

For most implementations of a mutex it won't work, but in principle it depends on how the mutex is implemented. If the mutex was implemented using files, perhaps it could be made to work. Usually ...
D.W.'s user avatar
  • 154k
2 votes

Are Kernel Codes (which are written in C) compiled during boot time?

MacOS does a very, very small portion of this: During boot time, it determines which exact processor model is used by your computer, and then for a very small number of important functions, processor ...
gnasher729's user avatar
  • 27.8k
2 votes
Accepted

Are Kernel Codes (which are written in C) compiled during boot time?

Usually, everything is compiled in advance: the kernel and userland applications. Roughly, the kernel is written in a special place on the disk (or other permanent memory), which the hardware will ...
chi's user avatar
  • 14.4k
2 votes

In a kernel, what are "global constructors"?

The link you provided has a clear definition: This tutorial discusses how to correctly invoke global constructors, such as those on global C++ objects. These are supposed to have run before your ...
Cort Ammon's user avatar
  • 3,243
2 votes

What is a file?

I think of a file as a sequence of bytes. Even after it loses its name (usually caused by a call to rm, which unlinks it), it still exists on the disk until its chunks get overwritten by other stuff. ...
ncmathsadist's user avatar
2 votes
Accepted

How can the initial "booting" state of a computer be different at different time points?

Can anything change in a computer without the user modifying something, also while not having internet connection? Yes, definitely - computers update their own states all the time, and some of these ...
gandalf61's user avatar
  • 1,569
2 votes

Why do operating systems freeze?

A "system freeze" is normally due to the system running out of some resource and spending it's limited resources left trying frantically to fix up the mess. I.e., too much CPU load, has no processing ...
vonbrand's user avatar
  • 13.9k
2 votes

Why doesn't everyone use distributed operating systems?

This is part of an answer. Others will probably be able to add other points. A chess platform has to do a limited number of things, while an OS has to be able to do everything that OSes do, which is ...
Mars's user avatar
  • 696

Only top scored, non community-wiki answers of a minimum length are eligible