Questions tagged [operating-systems]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
78 views

Operating Systems Qualifying Exam Visual Study Aids

I have read the Operating System Concepts book, watched a lot of videos on YouTube, practiced with past qualifying exam questions and several exams from other CS departments around the world. ...
1
vote
2answers
1k views

How CPU know which process generated an interrupt?

When a computer OS supports multi-program, it needs to have a scheduling algorithm to handle which process will be run by the cpu. If a process is in state 'blocked' waiting for IO, the scheduling ...
0
votes
1answer
854 views

Round-Robin Scheduler - What exactly is the quantum time used for?

Suppose you have three stages for a job: Creation stage = the job gets created Executing stage = the job is executed/served Finishing stage = the job is "marked" as finished. Now, say the quantum ...
2
votes
0answers
122 views

Mesa Semantics without Starvation?

When a process inside a monitor with Mesa semantics finishes, another process can acquire the monitor. Now there can be starvation here when there is a thread with a lower priority. Are there ...
14
votes
2answers
150 views

What are potential pitfalls with having a minimal kernel that runs managed code?

Suppose I want to build an operating system based on a very small native lower kernel that acts as a managed code interpreter/runtime and a larger upper kernel compiled to a non-native machine ...
7
votes
1answer
2k views

Difference between hypervisor and exokernel

An hypervisor (1st type) is a software that creates and run virtual machines, managing guest's operative systems's requests to the hardware. An exokernel is an operative system kernel, that let's ...
13
votes
1answer
3k views

Are all system calls blocking?

I was reading an article that describes the switch between user-space and kernel-space that happens upon a system call. The article says An application expects the completion of the system call ...
4
votes
1answer
2k views

How are system calls handled in a virtual machine?

Quoting wikipedia, a system call is: In computing, a system call is how a program requests a service from an operating system's kernel. This may include hardware related services (e.g. ...
1
vote
2answers
92 views

Handling TOCTTOU with system calls

What are some of the best practices when implementing system call functionality for handling/avoiding "Time of check to time of use" (TOCTTOU) security issues?
11
votes
5answers
692 views

Why is the OS design able to reduce power consumption?

I have read that OSes like Android and iOS are somehow optimised to improve battery life. My understanding is that a CPU executes a certain number of operations in a certain time, so I would think ...
10
votes
1answer
1k views

Are two-level schedulers only useful to manage swapping?

Two-level scheduling is useful when a system is running more processes than fit in RAM: a lower-level scheduler switches between resident processes, and a higher-level scheduler swaps groups of ...
20
votes
2answers
5k views

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 ...
23
votes
1answer
3k views

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?
5
votes
1answer
631 views

Bare Metal Operating Systems in High Performance Computing

Few years back, I stumbled across Return Infinity - the OS framework designed around flat, 64bit memory model, with minimal MMU / VM overhead, etc. I'm wondering if there are any public benchmarks or ...
13
votes
1answer
588 views

Memory ballooning in the OS

Some hypervisors optimize memory usage using a method that is called ballooning (at least that's what KVM calls it), this method deduplicates memory between VMs and sets common pages to read-only with ...
5
votes
1answer
767 views

Can multiple tasks in an RTOS share one stack to save memory?

Many small embedded systems have a limited amount of RAM, 10k or less. I know you can run an RTOS on such systems, however, a realistic number of tasks in such a system is very low, mainly because ...
4
votes
1answer
108 views

How are userland programs executed?

Say we have a simple OS with a filesystem, and some programs on that filesystem. How then does a program get executed by the OS? My understanding is that the executable file gets loaded into memory, ...
3
votes
2answers
292 views

Where is the OS when a process is running?

We know that operating system is responsible for handling memory allocation, process management etc. CPU can perform only one task at a time(assuming it to be single core). Suppose an operating system ...
3
votes
1answer
78 views

Which process states exist a multi-processor machine?

In a single-processor architecture, A process might be New, Ready, Running, Blocked and Terminated. Are there any additional states in a multi-processor architecture?
13
votes
3answers
1k views

How does the processor find kernel code after an interrupt?

When an interrupt occurs, the processor preempts the current process and calls kernel code to handle the interrupt. How does the processor know where to enter the kernel? I understand that there are ...
1
vote
1answer
214 views

Are Time-sharing and multi-tasking operating systems same or different

My question is regarding time-sharing and multi-tasking systems. Time-sharing operating system assigns time slot to each task while multi-tasking OS runs various jobs in parallel. But as I get it, ...
3
votes
1answer
60 views

Relation between Signals and Events

There are POSIX signals (linux man), and various event-based operating systems (such as TinyOS, most seem to be targeted at embedded systems). But the mechanisms seem very similar. Are the terms '...
1
vote
1answer
795 views

Are interrupts needed for a computer system to work?

Are interrupts needed for a computer system to work? Could you have a computer system (hardware and software, including the OS) that worked without an interrupt mechanism?
2
votes
1answer
387 views

Practical Page-Replacement Algorithms

Could anyone suggest other page replacement algorithms that are applicable to the real world aside from FIFO, Second Chance (Clock), Enhanced Second Chance and Random?
32
votes
7answers
7k views

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 ...
4
votes
1answer
4k views

How does the OS know the physical address of a process' first memory page?

If I have a program, its instructions are stored on the hard drive. When I double-click the executable the pages of memory for this process must get loaded in to RAM. However, for the pages to get ...
0
votes
1answer
303 views

Does a multi cpu system not improve the first come first serve (fcfs) cpu scheduling algorithm?

I created a program that simulates the fcfs scheduling algorithm. First I implemented it for a single core, then modified it for four homogenoues cpus. I compared the results with several datasets, ...
1
vote
2answers
105 views

Why don't hard drives actually delete data?

As far as I understand it, when you delete a file from trash/recycle bin the file isn't actually erased from memory but is instead marked as being okay to be over written. So, my question is as to ...
4
votes
1answer
3k views

What is the difference between LRU implemented for a cache and for page replacement?

I have read that true LRU page replacement requires significant hardware support, so only approximation of LRU is implemented for page replacement. So I wanted to contrast LRU that is implemented for ...
0
votes
1answer
54 views

Name for almost random memory distribution on the heap

If I had a heap like the following: with blue blocks being occupied memory and white blocks being free memory What is the general name given to the situation illustrated, where the free and occupied ...
2
votes
0answers
40 views

How can I talk about priority inversion if it's impossible to specify priority?

In the paper: Leslie Lamport: What It Means for a Concurrent Program to Satisfy a Specification: Why No One Has Specified Priority; ACM Symp Principles of Programming Languages, (POPL-12):78-83, ...
5
votes
1answer
496 views

Are cache contents specific to a process? [duplicate]

Suppose the L1 cache is filled up with data from some process. Now CPU loads another process. Does the new process share cache contents? Or the cache has to be invalidated completely in each context ...
1
vote
1answer
397 views

Is an Event Counter essentially an integer version of Barrier?

Just like there exists binary and integer Semaphores, does the Event Counter play an integer version of a Barrier? Event Counters are described in the paper Reed, DP; Kanodia, RK: Synchronization ...
2
votes
1answer
381 views

Access control matrices: who are the subjects: users or processes?

I'm studying the basics of security in computers. The doubt I have is that the access control matrix is presented as a matrix whose rows are the subjects and the columns are the objects. Also subjects ...
1
vote
1answer
127 views

How can OS schedule disk requests efficiently without knowing the LBN to PBN mapping ?

I learn from the OS schoolbook that the OS has the function that schedule the disk requests with the knowing algorithms such as SSTF, SCAN .. However, the date layout inner disk drives now is very ...
2
votes
1answer
68 views

Filing systems using index blocks

I know that a disadvantage of the index block system is that it can be wasteful of space if the files involved are mostly small in size, as index blocks are allocated from free space as required and ...
1
vote
1answer
173 views

Is the way an OS schedule threads related to parallel computing?

From Wikipedia: Operating systems schedule threads in one of two ways: Preemptive multitasking is generally considered the superior approach, as it allows the operating system to determine ...
3
votes
0answers
89 views

How hardware interrupt works on music

Does music stop for a short interval while listening into it,maybe a milliseconds that we just doesnt sense it cause by interrupts for operating system to run other programs
3
votes
3answers
4k views

How does worst-fit memory allocation react when encountering contiguous empty memory blocks?

So I have a problem understanding how the worst-fit protocol for memory allocation reacts to contiguous blocks of empty memory. None of the examples I have found address this possibility. For ...
4
votes
2answers
172 views

Does the OS create its own bootstrapped stack frame when running a program?

I've been doing nand2tetris exercises and I'm quite interested in how compilation actually works. In nand2tetris when creating the VM language I had to create a "bootstrap" which called the main ...
1
vote
1answer
181 views

Can a computer game can run on a boot mode without the aid of os? [closed]

I meant that that the game programmer can just add its own code to the game to manipulate its own low level function as the operating system does provide in a common executables,and load it into the ...
2
votes
2answers
2k views

Is there a shell between the kernel and hardware

First and foremost, i know what a shell, kernel is. Now the dilemma. Today i had my systems viva in college. The examiner asked me is there a shell between the hardware and the kernel. Obviously, i ...
5
votes
2answers
2k views

Why can't I run a mac program natively on windows? [closed]

Basically, I believe that if you have something like a .dmg file the OS opens it with a certain program which takes the code behind it and does things to it. So why couldn't you then take the program ...
1
vote
1answer
1k views

How do context switches factor into CPU utilization?

When studying operation systems, is context switch time included in CPU utilization time? For example, if 5 percent of CPU time is wasted to context switching, is CPU utilization 95 percent?
1
vote
1answer
47 views

What memory locations will the CPU fetch instructions from with instruction length of 16bits

While reading Stallings OS Internals and Design, I run into problem. Here is example from the book. For example, consider a simplified computer in which each instruction occupies one 16-bit word ...
0
votes
1answer
1k views

Maximum possible file size in the filesystem [closed]

A file system with 300GByte disk uses a file descriptor with 8 direct block address ,1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size ...
0
votes
1answer
70 views

Issue with Multithreading spin locks

a spin lock solution to the critical path problem is shown below . my question is will this or will this not result in starvation ? ...
3
votes
1answer
100 views

Why does making a seemingly insignificant edit to an executable's machine code return errors? [closed]

First of all, I would like to apologize if this question is in the wrong section. For all I know, it could be placed in Super User, Reverse Engineering, or Stack Overflow. Now lets get back the ...
3
votes
2answers
1k views

Which part of the computer allocates memory in RAM?

When we declare a variable there will be a random part of memory will be allocated in RAM. Which component will allocate the memory? Is the processor or any other specific hardware doing the ...
2
votes
1answer
2k views

Starvation in longest remaining time first CPU scheduling

I want to know if longest remaining time first (LRTF) CPU scheduling has starvation or not. Also give reason how it starve/does not starve a process. I know longest job first (LJF) may starve a ...

1
8 9 10
11
12