Questions tagged [operating-systems]

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

138 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
53 views

Why semaphores lead to loss of modularity?

In this article Semaphores in Operating System and other articles on the internet, they have mentioned one of the disadvantages of semaphores is that it leads to loss of modularity. They further said ...
user avatar
  • 141
4 votes
0 answers
95 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 ...
user avatar
4 votes
1 answer
138 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 ...
user avatar
  • 341
4 votes
2 answers
1k 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 ...
user avatar
  • 953
4 votes
0 answers
426 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?
user avatar
4 votes
0 answers
287 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 ...
user avatar
3 votes
0 answers
40 views

Is there a "theory" of operating systems?

Is there a theory for Operating Systems? That is, subfields of CS have theoretical parts; i.e. PL has type theory, ML has mathematical theorems, security has a lot of provable properties, etc. There ...
user avatar
  • 155
3 votes
1 answer
140 views

How to use Parallel Semaphores for Dining Philosophers Problem

I am in an intro to OS class and we are learning about mutual exclusion and semaphores. One classical problem we learned about was the dining philosophers problem. My professor touched on the ...
user avatar
3 votes
1 answer
837 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 ...
user avatar
  • 953
3 votes
2 answers
1k 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 ...
user avatar
3 votes
0 answers
147 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 ...
user avatar
  • 306
3 votes
0 answers
93 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
user avatar
  • 41
3 votes
1 answer
1k 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? (...
user avatar
  • 740
2 votes
0 answers
38 views

Exceeding limits of virtual address space

I still am confused whether I am asking the right question but here goes Consider a X bit processor. It can address theoretically a main memory of 2^x bytes(assuming byte addressable). Now consider an ...
user avatar
  • 405
2 votes
0 answers
58 views

CPU utilization estimation

In the Modern Operating System by Andrew Tanenbaum, Herbert Bos the authors provide their explanation of the concept of CPU utilization in the following way: A better model is to look at CPU usage ...
user avatar
2 votes
1 answer
309 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 ...
user avatar
2 votes
0 answers
39 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....
user avatar
2 votes
0 answers
35 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 ...
user avatar
  • 1,557
2 votes
1 answer
484 views

Deadlock vs "Progress" requirement of the solution to the critical section problem

I came across following problem: Consider following code: ...
user avatar
  • 1,557
2 votes
0 answers
25 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: ...
user avatar
  • 239
2 votes
0 answers
120 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 ?
user avatar
  • 341
2 votes
0 answers
1k 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?...
user avatar
2 votes
0 answers
50 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 ...
user avatar
2 votes
0 answers
2k 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] ...
user avatar
2 votes
0 answers
489 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 ...
user avatar
  • 953
2 votes
0 answers
320 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 ...
user avatar
2 votes
0 answers
102 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 ...
user avatar
  • 264
2 votes
0 answers
303 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 ...
user avatar
2 votes
0 answers
488 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 ...
user avatar
  • 21
2 votes
0 answers
934 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, ...
user avatar
  • 275
2 votes
0 answers
88 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 ...
user avatar
2 votes
0 answers
527 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: ...
user avatar
  • 465
2 votes
0 answers
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 ...
user avatar
  • 21
2 votes
0 answers
504 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 ...
user avatar
  • 29
2 votes
0 answers
87 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 ...
user avatar
2 votes
0 answers
154 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 ...
user avatar
2 votes
0 answers
42 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, ...
user avatar
2 votes
0 answers
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 ...
user avatar
2 votes
1 answer
144 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) ...
user avatar
  • 21
1 vote
0 answers
31 views

Does optimal page replacement cause the same number of faults for the reverse string?

Let $P_1P_2...P_k$ be a page sequence that gives $n$ page faults with the optimal page replacement algorithm. Does the page sequence $P_kP_{k-1}...P_1$ give the same number of page faults. This can be ...
user avatar
1 vote
1 answer
80 views

Tigers and elephants can't drink water from a pond simultaneously, while more than one tiger or more than one elephants can drink water simultaneously

Below is a question on synchronization mechanism which was asked in an interview in Indian Statistical Institute, M.Tech CS. I got hold of it from here. There is a forest where there are tigers and ...
user avatar
1 vote
0 answers
27 views

How MAC (Mandatory Access Control) model prevents trojan horse attacks?

I've heard that the MAC Model prevents Trojans to charm files on the system. How is it possible? Can somebody show any example that MAC model protects us against it?
user avatar
1 vote
0 answers
35 views

How could one construct a TLB so that not all the bits of the presented address need match to result in a hit?

I was wondering besides the typical matching of all bits in the presented address to the resulting page, is there another way of doing so? what are the benefits/ cons and how would one go about doing ...
user avatar
1 vote
0 answers
63 views

Starvation and Livelock

I think Option C is false. Following is my thought process: Starvation in general mean Process is waiting indefinitely for the resource or to get scheduled etc. [A/c to Galvin Book]. So, here in this ...
user avatar
  • 41
1 vote
0 answers
18 views

Regular OS Vs RTOS

I am curious to know if RTOS provides deterministic scheduling gurantees then why not all OS'es are RTOS? In what sense regular OS say linux better then RTOS say FreeRTOS?
user avatar
1 vote
0 answers
29 views

Race Condition in Mesa Monitor

...
user avatar
  • 111
1 vote
0 answers
28 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 ...
user avatar
  • 11
1 vote
0 answers
440 views

Difference between process contention scope and system contention scope

According to my understanding the difference between them is that in process contention scope there is a contention within the process for mapping user threads to kernel threads and for system ...
user avatar
1 vote
0 answers
24 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 ...
user avatar
1 vote
1 answer
108 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 ...
user avatar
  • 3,314