Questions tagged [operating-systems]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
380 views

Understanding google's user level threads in kernel threads

I came across Paul Turner work on increasing efficiency of M:N threading model. I am not able to grasp the concept at slide 18 of LPC-User-Threading It says : for two threads ...
2
votes
1answer
683 views

When will deadlock occur in this producer-consumer code

I was reading about Producer Consumer problem from Operating Systems by William Stallings where following code was given: ...
2
votes
1answer
388 views

Why can level-triggered interrupts be shared but not edge-triggered interrupts?

A key difference between the edge-triggered and level-triggered interrupts is interrupt sharing. Level-triggered interrupts can be shared. Edge-triggered interrupts cannot be shared. I read the line ...
2
votes
1answer
1k views

How do stack-based cache algorithms avoid Belady's anomaly?

I was going through page replacement algorithms from Galvin's Operating System book. I encountered this line about LRU: A stack algorithm is one in which the pages kept in memory for a frame set ...
2
votes
2answers
466 views

Language that system calls are implemented in

Lately, I have been reading about operating systems design. The idea that all user space programs utilize Kernel services via a "System Call Interface" have got me thinking further into this. Is ...
2
votes
2answers
143 views

Help understanding this algorithm that's supposed to solve the critical section problem through mutual exclusion

Our professor gave us the following algorithm that's supposed to solve the critical section problem. I'm guessing the code is just pseudocode so I'm not trying to focus on the strange syntax and just ...
2
votes
1answer
123 views

synchronization (test-and-set)

I have benn wondering about the following possibility: if I have multiple hardware threads on the same core, and then someone decides to use shared register to allow fast synchronization among threads ...
2
votes
1answer
3k views

How is the directory implementation done using a linear list?

I am reading Operating System Concepts by Silberchatz, Galvin, Gagne and they write that a directory can be implemented using a linear list. [pg 470, 8th ed] However, I visualize directories as a ...
2
votes
1answer
4k views

Can Shortest Job First Scheduling be subject to convoy effect?

Look at the below table for example : Look at the Non-Preemptive SJF table Suppose if the burst time of process $P_1$ was a very large number compared to $7$, the processes $P_3,P_2$ and $P_4$ have ...
2
votes
1answer
96 views

What is cold-start penalty ? What are some ways to reduce it?

when a new process is created using a fork() function, there is a cold start penalty, what is this and why does it happen?
2
votes
1answer
66 views

Designing solution to critical section problem with two semaphores vs single semaphore

I came across following problem: Let two processes P1 and P2 are there: ...
2
votes
1answer
724 views

How does hashed inverted page table work?

I understand hash function and inverted page table, but then the book I read describes something called hashed inverted page table (use hash to accelerate the finding because IPT is large), with TLB ...
2
votes
1answer
102 views

What are the recents topics of research that combine both systems research and theoretical computer science?

I am an undergraduate majoring in Computer Science and Mathematics. For my undergraduate research, I would like to work on something that lies in the overlap between systems research and theoretical ...
2
votes
1answer
210 views

Peterson algorithm for mutual exclusion

In the Peterson Algorithm for mutual exclusion an implicit assumption is that the operations with the shared global variables happen atomically. To me, this is not a superficial assumption , cause it'...
2
votes
1answer
159 views

Numerator of HRRN scheduling formula

In the HRRN scheduling, priority formula is P = (W+E)/E , where W: waiting time and E: estimated run time. CPU finds the job that has highest priority value and does that job. However, the formula ...
2
votes
1answer
172 views

What is the basic idea behind the usage of TLBs?

I know how Translation Lookaside Buffers work, and i also know we use them to improve the performance of data/program access by storing the recent page numbers - frame numbers in a memory cache. The ...
2
votes
3answers
2k views

Round Robin Scheduling

I understand that a big advantage of round robin scheduling over non-preemptive schedulers is that it dramatically improves average response times. By limiting each task to a certain amount of time, ...
2
votes
1answer
67 views

Incorporating event handlers

In IDE's we can drag a small continuous collection of pixels in a particular configuration to a place on the screen .This collection of pixels are called as controls . Corresponding to every control, ...
2
votes
1answer
2k views

Confusion in Banker's Algorithm: How resources are allocated?

I have seen examples about Banker's Algorithm from this Wikipedia link, this book and many other places. In all these examples some processes are allocated ...
2
votes
1answer
125 views

Deadlock avoidance: How does the system know in advance about the number of resources required by a process?

While studying about Deadlock Avoidance I came across a paragraph which states as given below: When the system needs to issue any resource to any process, then ...
2
votes
1answer
923 views

Best Fit Memory Allocation Algorithm Statistical Analysis

I've been reading book on Operating System, in which author writes : Somewhat surprisingly, it(Best fit) also results in more wasted memory than first fit or next fit because it tends to fill up ...
2
votes
1answer
1k views

Starvation Condition in CPU/Process Scheduling?

Let's say OS is using preemptive CPU scheduling. A process P1 gets a chance to run for some time and then next higher priority process comes and preempts P1. After that higher priority processes are ...
2
votes
1answer
1k views

Second Chance Page Replacement

In the second chance page replacement algorithm, if a page's reference bit is already set to 1, and the next page in line of the reference string is the same page, does the reference bit stay at 1 or ...
2
votes
1answer
2k views

A real-world example for a kind of real-time applications

I submitted a paper regarding hard real-time systems to an engineering journal. But the referees generally agreed my task model is too limited. My task model is a frame-based real-time application ...
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 ...
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 ...
2
votes
2answers
10k views

Difference between multitasking, multithreading and multiprogramming

I was a little confused between these three terms Multitasking, Multithreading and Multiprogramming Although every one means executing different lines of codes, and for every one we need something ...
2
votes
1answer
193 views

Process state in multi threaded process

What would be the process state in a multi threaded process, in which threads are in different states (running, waiting, blocked etc)
2
votes
1answer
538 views

Massalin's Synthesis Quajects equivalent to ASM generating macros used in Game Oriented Assembly LISP?

Alexia Massalin's Dissertation on Synthesis was a Phd thesis on Operating Systems that contained a concept called 'Quajects' (see Chapter 4). This is some additional commentary on the Phd Thesis. ...
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
186 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
799 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
227 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
292 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
706 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
345 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
74 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
3 4
5
6 7
12