Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
0answers
26 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 ?
-3
votes
0answers
67 views

What is the Definition of a counting semaphore

Can someone give me simple definition of a counting semaphore ?
-4
votes
0answers
96 views

Are there any advantages of using threads in single core system? [on hold]

Are there any advantages of using threads in single core system? And if there , your answer still valid if we have One-to-One mapping between user and kernel threads? Why ?
-1
votes
1answer
24 views

OS process management

Assume a process execution interrupted at the middle and CPU started executing a different process.How does the OS handle this situation?
0
votes
1answer
42 views

why do we run out of heap space even if we have virtual memory?

Whenever we try to get space in heap(using malloc or new) we can get out of heap space error if it exceeds the limit. But, we have virtual memory so why can't OS allocate that much space and then do ...
0
votes
1answer
38 views

Peterson Algorithm for process synchronisation

Consider Peterson's algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below. repeat ...
0
votes
1answer
29 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
10 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
21 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 ...
0
votes
0answers
12 views

Operating System: Confusion about scheduler activation?

According to the highlighted text followed, a new virtual process is created and it will save the state of the blocking thread, then the upcall handler schedules another thread that is eligible to run ...
3
votes
1answer
35 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
30 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?
2
votes
1answer
74 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? (...
0
votes
0answers
26 views

Notion of CPU burst in Time Sharing Operating Systems

As far as I understand OS calculates the CPU burst of a process based on its historical values and then may use algorithms like SJF etc for scheduling. But what if the OS is time sharing, where the "...
0
votes
0answers
13 views

Effective memory access time in case of multi-level paging with virtual memory

In multi-level paging with virtual memory, If I am using local page replacement algorithm (which I think is practically used), then there is no priority followed and pages at higher level can be ...
1
vote
0answers
23 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
59 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 ...
0
votes
3answers
64 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
25 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
25 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
68 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, ...
1
vote
0answers
31 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
2answers
48 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
16 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
57 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
34 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
0answers
27 views

Scheduling in multi core processor

I have an exercise. Let's say we have a system with two computing cores A and B. There are four processes P1(10,A), P2(5,A), P3(13,A), P4(2,B). The number is the next extinction in CPU and the letter ...
0
votes
1answer
30 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
14 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
28 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
156 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
13 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
0answers
32 views

Why is rotational latency usually not considered in disk scheduling?

I was pondering upon this question and couldn't get a satisfactory answer from my TA. I searched it up and here's what it showed: Most disks do not export their rotational position information to ...
0
votes
1answer
18 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 ...
0
votes
0answers
18 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
22 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, ...
0
votes
0answers
15 views

How can a usage message or non-trappable key sequence defeat a Trojan horse attack?

I've been reading Chapter 15 of Operating System Concepts 9th Edition. I am stuck understanding this part. A variation of the Trojan horse is a program that emulates a login program. An ...
2
votes
1answer
39 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
23 views

What type of process schedulers are typically used in EKG machines?

I'm researching real-time schedulers for class, and I was trying to think of interesting examples of machines that use real-time schedulers. I thought EKGs would be a good example, so I've been trying ...
0
votes
0answers
12 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 ...
1
vote
0answers
30 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
27 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
0answers
15 views

EDF vs Rate Monotonic

I have to task a set of periodic tasks. Why for EDF is suficient that the utilization factor is <= 1 in order to produce a feasible scheduling, and instead for Rate Monotonic an utilization factor ...
0
votes
1answer
37 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
23 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 ...
0
votes
0answers
11 views

metrics of utilization and starvation

Given n homogeneous machines $R$ and m homogeneous jobs $Q$ and an allocation schedule $F$ that maps $R\rightarrow Q$ w.r.t. time, what are the different metrics for ...
1
vote
1answer
75 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
55 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
42 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
20 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 ...