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
636 views

What is hardware trap?

Since it's called a trap I consider it caused by software, so why it's called a hardware trap? And how does it work?
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: <...
2
votes
0answers
204 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 ...
3
votes
1answer
172 views

Operating System: About user thread and kernel thread?

Is that a "thread" consists of both "user thread" and "kernel thread" as two parts? And when I create a "thread", is that I create a "user thread" and another "kernel thread" is created "in the ...
0
votes
1answer
50 views

Operating System: replace the process's memory space with a new program

What does it mean that "replace the process's memory space with a new program"? So who's memory space will be replaced by whom?
3
votes
1answer
300 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? (...
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 ...
2
votes
2answers
80 views

How is space from malloc allocated?

Whenever we load a process (which consists of object code, static and global variables, stack and heap space) into main memory it would be of fixed size. But, the program doesn't know in advance how ...
1
vote
3answers
154 views

Is it 100% OK to say “All software doesn't need to know the system lower than the architecture level”?

Most of you know this diagram. If this diagram is true, all software is free to not know the levels lower than ISA. But it's not true. Softwares like performance-critical programs or system softwares ...
0
votes
1answer
35 views

Linux OS/HW VM cooperation

From what i've learned, the HW is responsible for setting the accessed and dirty bits in the PTE of a process, and the OS is responsible for turning them off. My question is why? The first part, i ...
0
votes
1answer
772 views

How does the TLB identify a particular process?

I have read that the translation lookaside buffer (TLB) is implemented in hardware and stores the page numbers and the corresponding frame numbers for faster lookups. Now suppose there are two ...
3
votes
1answer
94 views

What is the benefit of using one to one thread mapping model instead of Many to Many or two level?

So in the silberschatz O.S book it says Windows uses one to one model (mapping user level threads to kernel level threads) but why? i thought many to many and two level models are much better, ...
4
votes
2answers
115 views

Why operating system needs interrupt stack, if it has process control block?

I'm reading about an operating system but some concept confuses me. What doesn't confuse me: When an interrupt or system call or processor exception occurs, it happens when user mode tries to ...
0
votes
1answer
659 views

What is the relation between Time Sharing operating systems and Round Robin CPU scheduler?

So i have asked this before, but i still didn't get my answer so I'll try to make my question more clear this time : Based on my O.S book, Time sharing operating systems switch between processes ...
0
votes
0answers
885 views

CPU scheduling Algorithm SJF VS SRTF average waiting time?

Let's say we have two CPU scheduling algorithm as SJF and SRTF and we have a arbitrary pool/set of processes with different ARRIVAL TIME and CPU BURST, then what CPU scheduling algorithm will result ...
2
votes
1answer
87 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 ...
0
votes
1answer
141 views

NX Bit in x86 vs x86_64

I've been reading about how the kernel manages memory in x86 from this popular blog post(https://manybutfinite.com/post/how-the-kernel-manages-your-memory/) and had a few questions. There is a part ...
0
votes
1answer
33 views

How can segment be 60KB

I read that each segment is 64KB,but how? If you have address ABCD:EFGH , then 1 segment is 16B if it is addreses by bytes. How do they don't overlap? Example: 0000:0010 = 00010 0001:0000 = 00010 , ...
0
votes
1answer
64 views

Multi-processing cpu utilization estimate

I find a formula on my book to estimate cpu utilization under multi-processing. $ U = 1 - P^n $ U: cpu utilization P: cpu idle I want to know why or how to proof. Edit: The book is about ...
-1
votes
1answer
88 views

I have a question about resource alocation to avoid dead lock

In the code below, three processes are competing for six resources labeled A to F.How can I modify the get request in each procedure in this graph to avoid dead lock You cannot move requests ...
1
vote
2answers
9k views

Difference between dynamic loading and dynamic linking in the OS

First of all, I saw many answers of this topic in Quora, Stackoverflow, and this site. But, I couldn't definitely understand the difference between dynamic loading and dynamic linking. What I ...
1
vote
1answer
22 views

Are process-safe mutexes shared between OSes?

I understand you can use process wide mutexes, but does this still apply if you have an additional virtualized operating system provisioned? For example, take two OSes: ...
0
votes
1answer
19 views

Where are file-information like “created” or “last edited” actually stored?

I can access some information about the files ("created" or "last edited") on my PC. But where are those information actually stored? Are they stored by the operation system? Could be possible as if ...
1
vote
1answer
32 views

Why is there no one to many Multithreading Model?

I am studying various multi-threading models. Here the user threads are mapped to Kernel Threads. They are - ...
1
vote
1answer
44 views

What is the meaning of idiosyncratic when refering to multiprocess abstractions?

I am currently reading this paper on library operating systems, more specific on Graphene. I stumbled over the following sentence: "Because multiprocess abstractions, such as signals or System V IPC, ...
4
votes
1answer
86 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 ...
0
votes
0answers
14 views

Operating Systems - Why Stack Growths For a Fixed Parameter N Are Inconsistent?

I am taking an Operating Systems course and as a project, we are printing the content of the PCB of a process from task_struct of that process and its mm_struct & vm_area_struct pointers. During ...
2
votes
0answers
108 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
1answer
134 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'...
0
votes
1answer
113 views

Virtual Memory and processes

In a Operating System, who decides which parts of a program (or task) has to be stored in the virtual memory and which in the RAM ?
0
votes
0answers
43 views

Segmented Paging mechanism virtual and physical pages

I have a system which uses segmented paging. Every address is divided as follows: (s,p,d) = 2,2,11. Main memory has a capacity of 32KB. There are 4 segments which have 4 virtual pages each. I have to ...
1
vote
1answer
508 views

Definitions of: virtual address space, page size

(I can't seem to find actual definitions of these terms anywhere, only hints and guesses). Is it fair to say, that: Virtual address space is the amount of bytes that can fit into RAM cells of all ...
1
vote
1answer
548 views

Difference between Time-sharing computers and computers which use Round Robin scheduling algorithm?

So maybe I'm confused in these concepts but i thought that time sharing computer is a computer which the processor switches between different processes quickly to achieve a good response time but ...
3
votes
2answers
67 views

How does software detect if an interrupt has occurred if it cannot set it's own interrupt handlers?

I'm currently working on designing a relatively simple processor using a custom ISA . It will use interrupts for I/O . From what i know , once the interrupt controller issues an interrupt , the ...
0
votes
1answer
47 views

EDF vs Rate Monotonic context changes

I'm studying real time scheduling algorithms. In particular EDF and Rate monotonic. I have an intuition that using EDF we have less context changes than using Rate Monotonic. But i dont know how to ...
0
votes
0answers
266 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 ...
0
votes
0answers
136 views

Utilization Factor, periodic tasks and schedulability

We have 2 periodic tasks that start at the same moment in a monocore processor. Why can happen that, even if the utilization factor is <= 1, the 2 periodic tasks are not schedulable ? For example, ...
0
votes
0answers
22 views

Can we run a program without os? [duplicate]

Because os is a special kind of program so does that also mean a normal program can run without os ?
0
votes
1answer
63 views

Can an operating system without api still work? [closed]

In theory operating system is a special program run by itself without help so that also mean normal program can still run by itself mean that the need for api is not must have so finally can we have ...
2
votes
0answers
475 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?...
0
votes
1answer
598 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,...
1
vote
1answer
55 views

Are there any stochastic models of non determinism in the rate of program execution?

We know that typical operating systems and high level languages (especially those with garbage collection) cannot be used for real time operating systems. Java & jet engines don't mix, and ...
1
vote
0answers
120 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 ...
0
votes
1answer
83 views

what does the author mean by directory structure in operating system?

I'm reading Operating System Concepts by Avi Silberschatz(9thE), in section 11.4 File-System Mounting, the author explains the steps of filesystem mounting as follows: The operating system is ...
2
votes
1answer
235 views

What's the directory structure on disk that keeps the information of all files?

I'm reading Operating System Concepts by Avi Silberschatz(9thE), in chapter 11 File-System Interface, when the author explains the concepts of file, he states that The information about all files ...
6
votes
1answer
183 views

Is there any mechanism where the kernel portion of an OS in memory may also be swapped?

I'm recently learning the part of I/O buffering of operating system and according to the book I use, When a user process issues an I/O request, the OS assigns a buffer in the system portion of ...
0
votes
1answer
816 views

Bits of memory address used for page number?

A $64$-bit computer has a virtual mem space of $2^{64}$ bytes and the computer also uses memory paging with size of $2^7$ $(128)$ bytes. Work out the bits of the memory address which are used for ...
1
vote
2answers
51 views

Are Kernel Codes (which are written in C) compiled during boot time?

I have a confusion regarding how the Kernel is loaded during the boot time. The intuition I have is like following: During installation of an OS, the compiled Code of the Kernel (depending on the ...
1
vote
1answer
322 views

Context-switch between two processes

In response to a clock interrupt, the OS saves the PC and user stack pointer of the currently executing process, and transfers control to the kernel clock interrupt handler. Then the clock interrupt ...
1
vote
1answer
22 views

Need to understand signals received vs sent

What is meant by in the following statement (from the paper titled "Implementing Lightweight Threads"): As in singlethreaded processes, the number of signals received by the process is less than ...