Questions tagged [operating-systems]

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

100 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
77 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
270 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
141 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
0answers
216 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
93 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
79 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
259 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
64 views

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

I came across following problem: Consider following code: ...
2
votes
0answers
161 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
96 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
44 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
1answer
440 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 ...
2
votes
0answers
199 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
143 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
225 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
590 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
64 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
252 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
5k 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
445 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
63 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
102 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
39 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
1answer
274 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 ...
2
votes
1answer
114 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
17 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 ...
1
vote
0answers
19 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
43 views
1
vote
1answer
59 views

Explain in laymen terms - How do modern programs translate into machine code

I'm sure this will benefit anyone else on a computer science fundamentals back-fill journey.. I'm slowly learning Assembly and while I'm starting to understand the core of it (MOV, JUMP, etc) and can ...
1
vote
0answers
21 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
63 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
337 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
36 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
35 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 ...
1
vote
0answers
154 views

pool of free page frames OS

I read that in a paging scheme memory management, some os's have a paging daemon that wakes up periodically to inspect the memory of the RAM. This is to ensure that modified pages can be scheduled to ...
1
vote
0answers
100 views

How is context switching disabled in a process?

By what provision is context switching disabled in a process ? Or is it the case that if a process is in in kernel mode , context switching is disabled by default ?
1
vote
0answers
20 views

Operating System: Redundancy of implement a monitor using semaphores in my textbook?

Why the part highlighted the following picture is need? I've been trying to follow to logic flow of it as follow: Imaging a Situation: Two processes enter/call F, first A, second B: Process A: <...
1
vote
0answers
29 views

Why isn't a process's PCB present in its memory?

I checked wikipedia PCB and its written that - Since PCB contains the critical information for the process, it must be kept in an area of memory protected from normal user access. In some operating ...
1
vote
0answers
461 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?...
1
vote
0answers
115 views

bakery algorithm, switching up the condition

I'm currently studying the Bakery Algorithm. I understand it for what it is but now I want to switch it up a bit. If we changed the < in the 2nd ...
1
vote
0answers
299 views

Difference between inverted page table and a standard one?

I know that for standard page tables each process would have its own page table and for inverted the OS would have it. But other than this what are the main differences between a standard page table ...
1
vote
0answers
37 views
1
vote
1answer
120 views

How can i draw a general resource graph which cannot be completely reduced but which is free from deadlock?

How can i draw a general resource graph which cannot be completely reduced but which is free from deadlock? A general resource graph which can be completely reduced and hence is free from deadlock is ...
1
vote
0answers
63 views

Default scan order in SCAN and LOOK disk scheduling algorithms

I've been learning various disk scheduling algorithms in Operating systems. I wanted to know if there was any default scan order in SCAN, C-SCAN, LOOK and C-LOOK algorithms, like towards higher ...
1
vote
0answers
1k views

Resource Allocation Graph Algorithm

In the book Operating System Concepts, it is said that: A claim edge $P_i \rightarrow R_j$ indicates that process $P_i$ may request resource $R_j$ at some time in the future. [emphasis added] ...
1
vote
0answers
366 views

Physically indexed virtually tagged cache

PIVT cache is indexed physically so address translation using TLB is needed to get into cache and we use virtual address as the tag for comparison . I read that homonym is a problem which is caused ...
1
vote
0answers
244 views

Internal fragmentation basic concept

Suppose I have two processes of 50 bytes and have only one partition (hole) of 100 bytes. Suppose the first process takes up the partition and 50 bytes is remaining . Can the second process reside in ...
1
vote
0answers
26 views

What's the official name of “New” page replacement algorithm?

I am studying some page replacement algorithms. I found an interesting algorithm called "New" algorithm. From page 17 of this slide (https://web.stanford.edu/class/cs346/2015/notes/Lecture_One.pdf) ...
1
vote
0answers
80 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 ...
1
vote
0answers
292 views

Do user level threads take advantage of multi processing?

I asked this question here on stackoverflow, but maybe because of off-topic over there, it didn't received proper response. Does user level threads take advantage of multiprocessing ? I read one such ...