Questions tagged [operating-systems]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
4k views

How to calculate average waiting time for round robin cpu scheduling?

I have tried to calculate average waiting time for the below details there are two answers I'm getting using two methods I'm not understanding which one is correct? The time quantum is 2 This is the ...
1
vote
1answer
91 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
2answers
26 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 ...
0
votes
1answer
40 views

Does Dekkers solutions to critical section problem ensure progress?

I was reading concurrency control section from Operating Systems book by William Stallings. In this book, he gives three attempts by Dekker to give solution to critical section problem: Attempt 1 <...
1
vote
4answers
8k views

Deadlock and cycle in a resource allocation graph

Here is a resource allocation graph asked in my Operating Systems Theory midterm. The question is, "Is there a deadlock here? Explain your answer in detail" Ra and Rb are resource sets and every dot ...
0
votes
0answers
26 views

What is the difference of Process synchronization management between Windows and Linux?

I am looking for some explanation about process synchronization management in windows OS and Linux OS and what they do about the critical section and mutual exclusion. I will be so grateful if someone ...
-3
votes
0answers
18 views

Problem solving an exercices in system architecture

So hey guys hope you are doing well. I have aproblem solving this exercices. I have tried a lot but it seems my answer are always wrong first here is the problem: In the case where these registers ...
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 ...
0
votes
2answers
95 views

Is this a deadlock?

Consider we have two processes P1 and P2. There are also two semaphores M and N which are initialized to zero. Here's how they execute: ...
0
votes
0answers
11 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 ...
0
votes
1answer
39 views

How to find a condition which leads to deadlock in non-reentrant locks

A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-...
1
vote
0answers
21 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 ...
0
votes
1answer
47 views

Calculation of speed up of a program executed in multi-threaded system

Speed up of execution of a program is to be calculated within a multi-threading rather than a single thread system. The program's 30% instruction can be executed serially & rest can be executed ...
0
votes
1answer
19 views

Real-time systems and real-time operating systems

Just to understand the topic a little bit better, I would like to know if there is a difference between real-time systems and real-time operating systems. I know that a real-time system is a system ...
1
vote
1answer
63 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
votes
2answers
4k views

SCAN and CSCAN algorithms of disk scheduling

I am having hard time understanding the working of SCAN and CSCAN algorithm of disk scheduling.I understood FCFS,Closest Cylinder Next but heard that SCAN resembles elevator mechanism and got confused....
0
votes
1answer
111 views

Converting physical address to logical

In 8-bit address space there are 16 pages and the page table stores: 68792EA51BD3CF04 (hex) The physical address is 39h, what is the corresponding logical address? I have literally no idea what to ...
1
vote
1answer
29 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 ...
0
votes
0answers
33 views

Is there any operating system running in Graphics cards?

Taking an example of NVIDIA graphic cards, is there a dedicated OS running on the Graphic card's GPU or the Host machine's ...
3
votes
1answer
361 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 ...
0
votes
1answer
18 views

Process synchronization problem

The atomic fetch-and-set x,y instruction unconditionally sets the memory location x to 1 and fetches the old value of x in y without allowing any intervening access to the memory location x. Consider ...
0
votes
0answers
31 views

Hierarchical page tables with page size of 8 KB

Consider a machine with a physical memory of 8 GB, a page size of 8 KB, and a page table entry size of 4 bytes. How many levels of page tables would be required to map a 46-bit virtual address space ...
0
votes
1answer
94 views

Is logical address generated by CPU and MMU same if Physical and Virtual address space are same?

The system has same physical and virtual address space i.e. 32-bit. Are the logical address generated by CPU and address generated by MMU same?
0
votes
1answer
47 views

Questions regarding CPU scheduling algorithms ( Round Robin and Priority scheduling )

Consider the following processes : 1) My First Question is if we need to schedule them using preemptive priority scheduling with Round-Robin for equal processes priorities with a quantum of 3. Here ...
0
votes
1answer
659 views

LRU vs FIFO page replacement

I am wondering if there is an instance where FIFO results in less page faults than LRU. For example: 2,6,5,7... In this string, if I have to complete it by ...
4
votes
1answer
3k views

How to satisfy bounded waiting in case of deadlock?

I have a doubt regarding bounded waiting. Deadlock implies no Progress because the processes take indefinite time to decide who will enter the critical section . But, Does deadlock implies no ...
0
votes
1answer
42 views

When is it best to use the second chance replacement algorithm?

I'm going through 'Operating Concepts' by Silberschatz, Galvin and Gagne (The Dinosaur Book) and it mentions the Second-Chance Algorithm (not enhanced) as an improvement on the FIFO replacement ...
1
vote
1answer
29 views

Is physical pages zeroed out before it's mapped to a virtual page?

I don't how this works. According to me if the physical memory is not cleared then there is some security risk as there may be some sensitive information in it from the other processes. How does the ...
0
votes
1answer
24 views

Making sense out of byte-order in text

I have stumbled about the way a text file is saved by the OS. I have typed: printf "ab" | hexdump and the output was: 6261 which are the letters in reversed ...
3
votes
1answer
545 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 ...
4
votes
1answer
105 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 ...
28
votes
5answers
49k views

What threads share in general?

Well this is general question. And if anyone want to make it implementation specific then I will prefer Unix related stuff. But first need to know following problems in generality: I read single ...
2
votes
1answer
67 views

Difference between *device descriptor* and *device handler*

I am studying Computer Architecture, and am a bit confused about the difference between device descriptors and device handlers in operating systems. Am I correct in saying that a device handler is ...
0
votes
0answers
103 views

Calculating max file size

The question is "For a file system with 11 direct blocks, 5 indirect blocks, 2 secondary (double) indirect, 2 triple indirect blocks calculate the maximum file size allowed if block size is 2048 in a ...
1
vote
1answer
150 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
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] ...
0
votes
1answer
3k views

Operating Systems - SJN/Round Robin - turn around time + waiting time

2.(10 pts) a) You are given 4 processes in a batch system that all arrive at time 0 with the following CPU burst times: P1 : 35, P2: 25, P3: 13, P4: 22. Assuming there is no context switch ...
0
votes
1answer
24 views

NRU: Page fault on writing?

I am trying to understand the concept of NRU from the following link. I have got some problem in understanding the text below: NRU page replacement Algorithm If the hardware does not have these ...
0
votes
2answers
14k views

Calculating disk seek times

I have a system where disk requests come to a disk drive for cylinders in the order 10, 22, 20, 2, 40, and 38 at a time when the disk drive is reading from cylinder 20. The seek time is 6ms per ...
1
vote
0answers
38 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 ...
0
votes
0answers
20 views

Preemptive priority scheduling problem with same priority

So if T1(priority 3, arrived first) was preempted it is put back to the runqueue. If there is already T4(priority 3, arrived fourth) inside the runqueue, which one of these two will be handled first?! ...
5
votes
1answer
10k views

Difference between page table and inverted page table

I do not understand the difference between page table and inverted page table. I know that both are used to translate the logical addresses into physical addresses produced by the processes necessary ...
0
votes
0answers
290 views

Logical to Physical Address

I have an exam coming up and my teacher posted a practice exam for it. Problem is that I solved the question but I am not sure if I am doing it right or getting the right answer as he refuses to give ...
3
votes
1answer
431 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 ...
-1
votes
1answer
126 views

what is the difference between an adapter and a controller?

1- why do have a USB controller but a display adapter ? 2- I have heard the terms network adapter and network controller being used, is there a differance between those ?
2
votes
1answer
95 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?
0
votes
2answers
1k views

Why can't OSes swap out processes that are waiting for I/O?

In the book, Operating System Concepts, 9th Edition, there is this paragraph that I don't quite wrap my head around. Swapping is constrained by other factors as well. If we want to swap a process,...
0
votes
0answers
38 views

Spin-Lock and Busy-Wait

This question has been asked and the top answer https://stackoverflow.com/a/38173155/12862537 is not satisfactory. So, it would be nice if someone could specifically point out the similarities and ...
0
votes
0answers
17 views

Android apps IPC during navigation of activity

During navigation of activities in an Android app by clicking back button, the current activity is paused, the previous one is restarted and resumed and the former is stopped. How does activity ...
0
votes
0answers
238 views

Can a TLB hit lead to a page fault?

$Can$ $a$ $TLB$ $hit$ $lead$ $to$ $a$ $page$ $fault?$ My answer is yes, as say even after a TLB hit if the page in the memory is dirty and it will lead to Page fault. Other case can be that, it is ...

1
2 3 4 5
12