Questions tagged [operating-systems]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
321 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
1answer
61 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?
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
84 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
163 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
36 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 ...
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, ...
0
votes
1answer
735 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
1answer
931 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 ...
0
votes
0answers
975 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 ...
0
votes
1answer
162 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 ...
5
votes
2answers
4k views

What's the difference between Process Context and Process Control Block?

I know that Process Context is something that is stored when a process is preempted, containing all the necessary info to restart the process at a later time. I also know that the Process Control ...
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 , ...
1
vote
1answer
561 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 ...
0
votes
1answer
70 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
105 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
10k 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 ...
0
votes
2answers
989 views

Since physical memory is the RAM where is logical memory stored on the computer?

Since logical memory maps to the RAM (physical memory) it has be stored somewhere right and it will obviously take large bunch of memory of itself. Where is it stored?
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
2answers
501 views

Hierarchical Paging memory requirements

OS Book written by Galvin et all states that if page size is 4KB and size of virtual space is 32 bits then 2^(32-12) page entries would be required which is too huge to store in memory!! Therefore ...
3
votes
1answer
2k views

How does an Operating System without kernel mode work?

Andrew S. Tanenbaum, in his book Modern Operating Systems (3rd Edition), states that the distinction between operating system software and normal (user mode) software can sometimes be blurred in ...
5
votes
1answer
5k views

Program compilation and execution flow

I was studying operating system concepts from Silberschatz, Galvin and Gagne's book (sixth edition) and I have some questions about the flow of execution of a program. A figure explains the processing ...
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
47 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, ...
1
vote
2answers
26k views

Size of address spaces (logical and physical)

Suppose a system in which addresses (physical and logical) occupy 32 bits, page size is 1024 bytes (210), and physical memory is of size 32MB. How many frames are in physical memory? Is the logical ...
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
1answer
161 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
0answers
111 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 ?
0
votes
1answer
367 views

Effectiveness of TLB

This is a book question: Suppose that a machine has 48-bit virtual addresses and 32-bit physical addresses. Suppose this same system has a TLB (Translation Lookaside Buffer) with 32 ...
0
votes
1answer
119 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
44 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
582 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
77 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
0answers
268 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
139 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
1answer
915 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 ...
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 ...
1
vote
1answer
56 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
123 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
94 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
258 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 ...
1
vote
1answer
8k views

Explain Hashed page tables in operating system

I have a difficult time understanding hashed page tables used in virtual memory management. Here is picture of the slide that I am referring to: I understand that p is hashed and then the hash is ...
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
2answers
94 views

File systems and writing one

I am going through the following series of lectures on OS development . http://www.brokenthorn.com/Resources/ In the fourth tutorial , I came across the term " OEM" parameter block that stores the ...
1
vote
1answer
333 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 ...
0
votes
0answers
46 views

An energy consumption problem

We want to show one schedule of jobs consumes less energy than another one. For example, there are two schedules A and B. Both the schedules A and B schedule two jobs $j_1$ and $j_2$ with execution ...