Questions tagged [operating-systems]

Questions about the principles of software that interfaces between hardware and applications.

785 questions
67
votes
2 answers

What happens to the cache contents on a context switch?

In a multicore processor, what happens to the contents of a core's cache (say L1) when a context switch occurs on that cache? Is the behaviour dependent on the architecture or is it a general behaviour followed by all chip manufacturers?
Ankit
  • 1,337
  • 2
  • 14
  • 18
36
votes
7 answers

Does an Operating System inject its own machine code when you open a program?

I'm studying CPU's and I know how it reads a program from the memory and execute its instructions. I also understand that an OS separates programs in processes, and then alternate between each one so fast that you think that they're running at the…
Revering Sumoda
  • 437
  • 6
  • 8
34
votes
5 answers

What threads share in general?

Well this is general question. And if anyone want to make it implementation specific then I will prefer Unix related stuff. But first need to know following problems in generality: I read single process can have multiple threads. Multiple threads of…
Mahesha999
  • 1,773
  • 7
  • 30
  • 45
34
votes
2 answers

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

After reading several sources I'm still confused about user- and kernel-level threads. In particular: Threads can exist at both the user level and the kernel level What is the difference between the user level and kernel level?
Sheldon
  • 803
  • 2
  • 9
  • 16
23
votes
1 answer

Can an interrupt handler be preempted?

Can a running interrupt handler be pre-empted by another interrupt handler? If this is possible, in which scenarios is this safe, and in which scenarios is it not? If this is not possible, why?
sanatana
  • 407
  • 4
  • 7
22
votes
2 answers

How does an operating system create entropy for random seeds?

On Linux, the files /dev/random and /dev/urandom files are the blocking and non-blocking (respectively) sources of pseudo-random bytes. They can be read as normal files: $ hexdump /dev/random 0000000 28eb d9e7 44bb 1ac9 d06f b943 f904 8ffa 0000010…
20
votes
7 answers

Difference between bare metal hypervisor and operating system

I'm currently studying virtualization and while looking at hypervisors I realized that bare metal hypervisors are quite similar to operating systems. So while from an application standpoint they are different, can an operating system theoretically…
fipps omat
  • 301
  • 2
  • 3
20
votes
7 answers

What are examples of inconsistency and incompleteness in Unix/C?

In Richard Gabriel's famous essay The Rise of Worse is Better, he contrasts caricatured versions of the MIT/Stanford (Lisp) and New Jersey (C/Unix) design philosophies along the axes of simplicity, correctness, consistency, and completeness. He…
Ellen Spertus
  • 1,592
  • 13
  • 30
19
votes
4 answers

Does cooperative scheduling suspend processes when they perform an I/O operation?

Many operating systems references say that with cooperative (as opposed to preemptive) multitasking, a process keeps the CPU until it explicitly voluntarily suspends itself. If a running process performs an I/O request that cannot be immediately…
Ellen Spertus
  • 1,592
  • 13
  • 30
19
votes
3 answers

Clever memory management with constant time operations?

Let's consider a memory segment (whose size can grow or shrink, like a file, when needed) on which you can perform two basic memory allocation operations involving fixed size blocks: allocation of one block freeing a previously allocated block…
19
votes
2 answers

What is a GPU year?

I am reading papers in machine learning and they say things like, "This computation took $x$ number of GPU years". What is a GPU year? How long is that?
Frederic Chopin
  • 293
  • 1
  • 2
  • 6
18
votes
4 answers

How can the Operating System run on the same chip it is supposed to be managing?

From my readings about Operating Systems (reading the basic material on Wikipedia, tech sites, etc) I've learned that the Operating System is a program that allows programs and applications to interact with the hardware in an efficient and safe…
CodyBugstein
  • 3,017
  • 11
  • 31
  • 46
18
votes
3 answers

What guarantees do "soft" real-time operating systems actually provide

I think I know what a "hard" real-time operating system is. It is an operating system with a scheduler that provides a contract with the application programmer. An application provides a deadline with each resource allocation request. If the…
18
votes
13 answers

Why do we need full-fledged workstations running massive OSes with massive software?

I've grown up with computers. While watching old computer TV programmes and documentaries and reading the news about constant issues with these modern systems -- everything from the sheer amount of change/bloat/costs to all the security and privacy…
15
votes
2 answers

Performance of microkernel vs monolithic kernel

A microkernel implements all drivers as user-space programs, and implements core features like IPC in the kernel itself. A monolithic kernel, however, implements the drivers as a part of the kernel (e.g. runs in kernel mode). I have read some…
mmk
  • 386
  • 1
  • 2
  • 7
1
2 3
52 53