Questions tagged [operating-systems]

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

136 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
41 views

Is there a OSI model equivalent for describing the abstract layers present in performing a computation for an operating system?

In describing where a system vulnerability exists, I often find a need for a model that partitions a operating system and its components into abstraction layers. Similar to how the Open Systems ...
4
votes
1answer
106 views

Task scheduling algorithm that limits concurrency

My prof introduced us an algorithm with semaphores that was used to solve the "dining philosophers" problem. The algo is ok, apart from that it limits concurrency. What does mean that it "limits ...
4
votes
0answers
342 views

Are these modern operating systems monolithic or microkernel?

I know that (at least at its conception) Linux and Mac OS were both monolithic kernels. My question is, what kind of kernels are Linux, Mac OS, and Windows today and why?
4
votes
0answers
198 views

Mutex implementation on top of a preemptive scheduler that does not guarantee liveness

I'm implementing some synchronization primitives in the standard library of an operating system. Specifically, I want to implement mutexes and condition variables. This is on top of a microkernel with ...
3
votes
1answer
449 views

Does starvation freedom imply progress?

The above answer taken from the book https://www.amazon.com/Operating-Systems-Sibsankar-Haldar/dp/8131730220 says starvation freedom may not imply progress as processes can be deadlocked. I think ...
3
votes
1answer
554 views

Convoy effect in priority scheduling and SJF (Non preemptive)

In books, I have read that FCFS suffers from convoy effect. I think that even SJF and priority(both preemptive and non preemptive) can suffer from convoy effect. In SJF, if a process with large burst ...
3
votes
1answer
367 views

Paging: Does the page table of a process also gets swapped out when the process gets swapped out from main memory?

Does a process's page table too gets swapped out to secondary storage from main memory when the process gets swapped out to secondary storage from main memory? And gets swapped back in when the ...
3
votes
0answers
124 views

Isn't resident set management superfluous?

My question is in the context of a paging virtual memory system. THE PREMISES: The function of resident set management (RSM) is to: Impose an upper bound on the cardinality of a process' resident ...
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
1answer
726 views

How do modern Operating Systems detect process starvation?

So first off do the modern operating systems like windows and linux have a method for detecting starvation? if not, why? and if they do, then how are they going to detect starvation of a process? (...
2
votes
0answers
36 views

Why can't OS's keep audio and video recording in sync?

It seems every program that purports to record webcams fails to keep audio and video in sync. Moreover, there are probably man millenia being spent by people trying to correct for this during editing....
2
votes
0answers
24 views

Does this state certify to be called as a deadlock?

I came across following problem: Barrier is a synchronization construct where a set of processes synchronizes globally i.e., each process in the set arrives at the barrier and waits for all others ...
2
votes
0answers
188 views

Deadlock vs “Progress” requirement of the solution to the critical section problem

I came across following problem: Consider following code: ...
2
votes
0answers
247 views

Operating System: Busy waiting is not eliminated with semaphore?

Why the busy waiting is not eliminated even after we put the current process into the process list and "block()"ed it? So even if the process is in waiting state we still call it "busy waiting"? I'm ...
2
votes
0answers
116 views

Starvation algorithm in operating system

Is there an algorithm for mutual exclusion with shared flag variables, as the Peterson's one, that doesn't prevent the starvation ?
2
votes
0answers
800 views

Latency and Throughput Bounds

Say that I have a superscalar processor and I am given the latency, issue and capacity (in clock cycles) for different instructions. What is the general formula for latency bound and throughput bound?...
2
votes
0answers
46 views

Can you read a file as a binary number?

This is a pretty naive question, but I would like to better understand the basics of information storage on a computer. I am not concerned with the detail of how any one operating system achieves ...
2
votes
0answers
244 views

why valid-invalid bit is needed in simple paging system?

I am learning OS from Silberschatz book. I read the Valid-invalid bit in a process page table also. But I could not understand why valid-invalid bit is required. The pagetable is dynamically built as ...
2
votes
0answers
92 views

Where does the CPU scheduler sit in a layered OS design

In a layered approach to OS design, each layer can only access routines from the layers below itself. For example, say I had two levels: memory management and the CPU scheduler Where does the CPU ...
2
votes
0answers
228 views

many to many multithreading

In many to many multithreading model the processor threads are multiplexed to a lesser or equal number of kernel threads. What exactly does it mean?? Does it mean that if a kernel is executing a ...
2
votes
0answers
294 views

When you first start a system boot, are you in kernel mode or user mode? Why?

I'm confused as to what mode computers boot in. My thought process was that since kernel mode is effectively the base layer of protection for the computer, it would boot in kernel mode and then load ...
2
votes
0answers
710 views

How are LRU and Clock algorithm different?

I am modeling the Gclock-pro buffer replacement algorithm in Linux kernel. Because there are many existing modeling works on LRU, I am considering adopting LRU model to roughly describe Gclock-pro, ...
2
votes
0answers
79 views

Could an OS relinquish control back to the bootloader?

I'm wondering if it is feasible for an OS to return control back to the bootloader, and boot a second OS after itself. Reason being -- I've been musing on bootkits, and wondering if it would be ...
2
votes
0answers
348 views

Given a program which when executed spawns two concurrent processes : semaphore X : = 0 ; Is it possible for process P1 and P2 to starve?

Given below is a program which when executed spawns two concurrent processes: ...
2
votes
0answers
6k views

Solving for Hit Ratio of a Theoretical Memory System

Long time lurker, first time poster. The book I am reading is William Stalling's "Operating Systems: Internals and Design Principles" Seventh Edition. Stalling's definition of hit ratio according to ...
2
votes
0answers
498 views

Soft real time operating systems

I know the basic idea and difference between hard and soft RTOS. I wanted to know a large scale and specific example of soft RTOS. I read in this site that even LINUX is a soft RTOS. Is the ...
2
votes
0answers
75 views

Context switching in M:N threading models?

I wanted to know how M:N kernel user thread model handles context switching, between multiple khread and pthread. How does the PCB/TCB for process and threads look like, how is state of registers ...
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 ...
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, ...
2
votes
0answers
6k views

Effective Acces time in Demand Paging system with Associative memory

Q: Consider a demand-paging system with a paging disk that has an average access and transfer time of 20 milliseconds. Addresses are translated through a page table in main memory, with an access time ...
2
votes
1answer
127 views

How does RAID-5 algorithm locate the right device?

Please consider the following diagram of a RAID-5 array (Ignore the gray background): Now, given a logical address, how can one return the device number (0-3)? For example, DeviceByLogicalSector(50) ...
1
vote
0answers
22 views
1
vote
0answers
19 views

Understanding Cyclic Dependencies when using Soft Update for Filesystems

We recently delved into the concept of "Soft Updates" as a mean of maintaining a Filesystem as consistent. The solution, as we learned it, calls for 3 basic rules: We'll create a pointer to a file ...
1
vote
0answers
24 views

Is process address space part of Process Control Block(PCB)?

I recently read about the process address space and PCB and trying to link them together. I don't find much literature on their relation. Is the process address space a part of the PCB data ...
1
vote
1answer
71 views

Why are special instructions used to implement system calls? Why not use normal subroutine calling instructions?

The transfer of control is often completed through some type of software interrupt instruction. These special instructions result in the CPU to save the current state of the machine and transfer ...
1
vote
2answers
40 views

Determine page number and offsets for address references

I'm working on learning operating systems and I've come across a strange question that I don't know how to answer. The question is: Assuming a 1-KB page size, what are the page numbers and offsets ...
1
vote
0answers
40 views

How do computers really communicate with hard-drives on x86_64?

All of us have saved a file on our computers using a programming language. If I look down through the layers of abstraction, I usually get stuck at a kernel-level call or a C-call like ...
1
vote
0answers
20 views

Operating System scheduling

I was reading a book on Operating System by Galvin and came across this : In the latest version of Solaris, scheduling is controlled by loadable tables. Depending on the table currently loaded, the ...
1
vote
1answer
31 views

Is “capability-based security” vs “hierarchical-protection-domain based security” a false dichotomy?

The wikipedia page on capability-based security states: Capability-based security is to be contrasted with an approach that uses hierarchical protection domains. However, in order to implement ...
1
vote
0answers
75 views

Given only TLB Lookup time, and memory access time, can the TLB hit rate be negative?

I'm given the following problem: TLB lookup time is given as 8ns and memory access time for a computer system is given as 40ns. What should be the TLB miss rate to achieve effective memory ...
1
vote
0answers
60 views

Expected value of next CPU burst using exponential averaging

The burst time is needed for Shortest Job First (SJF) and Shortest Run Time First (SRTF) scheduling. To get the approximate burst time, we use the equation $$\tau_{n + 1} = t_n + (1 - \alpha)\tau_n$$ ...
1
vote
0answers
32 views

Doubts on Virtually Indexed,Physically tagged Cache

I tried referring a few material (videos on youtube and this link as well), but I still couldn't wrap my head around the concept. My (brief) understanding of the Virtually addressed, Physically ...
1
vote
0answers
23 views

Comparing wait-signal alternatives for synchronizing two piece of programs

I came across following problem: A certain computation generates two arrays a and b such that ...
1
vote
0answers
33 views

Why in the Map Reduce Implementation, why not stream the records to the reducer (via TCP) as they are being produced by the mappers?

In the Map-Reduce implementation, the reducers start when all mappers finish their jobs. Why don't we stream the records from mappers to reducers while they are being processed instead? I think there ...
1
vote
0answers
56 views
1
vote
0answers
22 views

Addresses with no memory allocated

I've read that a program can crash if it tries to access addresses with no memory allocated. But, how is it possible that an address has no memory allocated? When does it happen?
1
vote
0answers
293 views

Difference between present - absent bit and valid - invalid bit in a page table?

while reading I found this: Present/Absent bit – Present or absent bit says whether a particular page you are looking for is present or absent. In case if it is not present, that is called Page ...
1
vote
0answers
2k views

Difference between Response time, Execution time, and CPU time

I studied Computer Architecture from David A. Patterson and have came across the idea of Response time. Response time also called Execution time. The total time required for the computer to ...
1
vote
0answers
73 views

How can I implement locking a range of values in a sorted sequence?

I am trying to write a general purpose locking algorithm which allows me to lock a range of contiguous values in a sorted array. To start with, these could be exclusive locks - so two concurrent locks ...
1
vote
0answers
78 views

How is switching among user-level threads realised in the user space?

This is with respect to user-level threads where the kernel only knows about the process as a whole, and threads are created and maintained in the user space. Each thread has its PC, registers, stack ...