Questions tagged [operating-systems]

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

1
vote
1answer
112 views

Do networking ports come from “port-mapped I/O”?

Do networking ports come from "port-mapped I/O"? I was watching a hardware basic video by Brian Will: https://www.youtube.com/watch?v=9-KUm9YpPm0 And they brought up this concept at 18:15 ...
6
votes
1answer
497 views

Bounded waiting and starvation free in critical section problem

i have 4 question regarding relation between starvation and bounded waiting. 1.Does starvation-freedom imply deadlock-freedom? My Answer-: From here, definition of starvation free is Freedom ...
2
votes
1answer
64 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, ...
1
vote
1answer
41 views

New Idea for accessing memory across an inter-network connected system

I have the following idea for a network-based operating system. Suppose we have two computers A and B in a network. If computer B wants to access the memory of computer A, it can access by using the ...
1
vote
0answers
24 views

Create a program in Python that works with mathematical operations [closed]

Write a program that takes N numbers as input and prints all 3^(N-1) equations that can be formed by inserting the operators +, -, or * between these numbers (keeping them in the initial order). Also ...
2
votes
0answers
197 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 ...
1
vote
0answers
22 views

optimization problem: Find Phase of input for minimized max output [closed]

Let the $\textbf{bold characters}$ represent the vectors/matrices.All the vectors/matrices/scalars only refer to real numbers. In a continuous LTI system. $\frac{d\mathbf{T}(t)}{dt}=\mathbf{A}\...
1
vote
1answer
417 views

How can context switch affect the modification of a variable?

float myTotalAmount=0; void update(float amt){ myTotalAmount+= amt; } Task A called update(10); Calculated ...
0
votes
1answer
233 views

Round Robin Scheduling: No process in Ready Queue

First post here, glad I found this exchange. I am in my Operating Systems course at university learning process scheduling. In my homework assignment we have to fill out a simulated scheduling chart ...
3
votes
0answers
210 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 ...
2
votes
1answer
437 views

Is thread in operating system = thread function in programming languages?

I'm new to Operating System, just learnt about process and now is about to learn about threads. From what I understand, a program is an executable file, program code a process is a program in ...
1
vote
0answers
26 views

What's the official name of “New” page replacement algorithm?

I am studying some page replacement algorithms. I found an interesting algorithm called "New" algorithm. From page 17 of this slide (https://web.stanford.edu/class/cs346/2015/notes/Lecture_One.pdf) ...
1
vote
0answers
79 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 ...
0
votes
2answers
1k views

Compute how much memory is needed for a two level page table

Im studying operating systems and i found an exercise that i cant solve. It asks to compute the memory space needed for a two level page table. The logical addresses are 32 bit, Page size is 4KB ...
2
votes
2answers
669 views

Increment and Decrement on binary semaphores when their values are $1$ and $0$ respectively?

What happens if we increment binary semaphore $x$ when it is equal to $1$. E.g A process executes $V(x)$ when $x==1$; What are the possible cases then- Process would be blocked till $x$ becomes $0$. ...
2
votes
1answer
621 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: ...
1
vote
0answers
289 views

Do user level threads take advantage of multi processing?

I asked this question here on stackoverflow, but maybe because of off-topic over there, it didn't received proper response. Does user level threads take advantage of multiprocessing ? I read one such ...
2
votes
2answers
82 views

how the instructions are stored in relocatable format on disk

I understand how the instructions are kept in relocatable format in RAM. It is done so by keeping a base register and a limit register. Physical address = base register value + logical address. And ...
2
votes
1answer
290 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 ...
0
votes
1answer
73 views

Understanding x64 and x86 OS with 64bit cpu

Kinda stupid question, but makes me a bit confused. If my OS (Win 7) is 64-bit type system and my CPU is 64-bit, why Program Files directory is marked (x86), x86 stands for 32-bit OS?
2
votes
2answers
200 views

Characterize an OS as multiprogrammed OS

Which of the following features will characterize an OS as multiprogrammed OS? More than one program may be loaded into main memory at the same time. If a program waits for certain event another ...
9
votes
2answers
597 views

What is a file?

I'm looking for a formal definition of file that does not only include storage but also abstractions like procfs or /dev/null (or any fuse-based file) that do not relate to storage. So far I know ...
-2
votes
2answers
131 views

page fault while executing machine instruction

A process executing machine instruction Y right after machine instruction x.On executing x It causes a page fault. what is the next instruction that is executed immediately on restarting the process. ?...
0
votes
2answers
856 views

difference between deadlock avoidance and detection

I know the difference between deadlock prevention and avoidance. But i want to know the difference between deadlock avoidance and detection. ?
1
vote
1answer
116 views

Starvation is possible or not?

let S and Q to be initialized to 1 ...
3
votes
6answers
2k views

Does Deadlock imply Starvation

If there is a deadlock between the processes does that mean that there is starvation also? My Thinking: deadlock is no process using that resources , but starvation is like not giving chance to only ...
0
votes
1answer
325 views

Is Bounded Waiting satisfied for this 2 process Solution?

This is my new post linked with my previous post. Is bounded waiting satisfied in the 2 Process Solution? The answer in that post was very useful and cleared many concepts, but I just want to apply ...
1
vote
1answer
444 views

Is bounded waiting satisfied in the 2 Process Solution?

Suppose, There are $2$ processes $P1$ and $P2$. It is given that Mutual Exclusion and Progress are satisfied by these $2$ processes. Suppose, Programming protocol is designed such that CPU only ...
3
votes
2answers
253 views

Does mutual exclusion hold in this case?

I entered into a discussion with a friend on the following question, which asks if mutual exclusion holds: Consider two processes: $s_1$ and $s_2$ are two variables, set equal initially. P1: ...
-2
votes
2answers
1k views

I/O bound processes over CPU bound processes [closed]

will an OS which favors I/O bound processes over CPU-Bound processes, experience less average waiting time? If yes, why?
3
votes
1answer
6k 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
1answer
140 views

Would time travel be useful for optimization?

Let's say we have circuitry that can send pieces of data to the past state of the program through literal time travel. Said time travel takes 1-5 clock cycles (I cannot assume the nature of time ...
1
vote
1answer
1k views

what is the need for valid/invalid bit in paged memory technique?

How is the valid/invalid bit in paged memory useful? I am not able to understand the significance. Is it also somehow used to share the processes among different users.
3
votes
2answers
76 views

How does one program crashing not crash the entire system?

In Windows, if you write a random assembly program that has a random jump to an address that doesn't exist, the program crashes and Windows says something went wrong with the program. Since each ...
2
votes
2answers
790 views

how can a program be OS-dependent?

I know the fact that you cannot run the same machine code on two different machines, so the software must be machine dependent (i.e Arm program cannot run on either powerpc or x86). but in reality ...
-1
votes
1answer
6k views

How to compute total internal and external fragmentation

I want to find the total external and internal fragmentation. What I understand is that external fragmentation occurs when processes are loaded and removed from memory, causing memory to be broken ...
0
votes
1answer
6k views

How many bits for offset/frame/page

I'm working on the following exercise and can't get the calculations right: Assume an OS uses: 33 bits for physical address 34 bits for logical address 2KB frame size Calculate: How many bits are ...
3
votes
0answers
88 views

Isn't resident set management superfluous?

My question is in the context of a paging virtual memory system. THE PREMISES: The function of resident set management (RSM) is to: Impose an upper bound on the cardinality of a process' resident ...
0
votes
1answer
1k views

thread scheduling in multi core architecture

In multi core architecture, let us say we have M cores and N threads (N > M) and a process once assigned to a core can't migrate to another core's ready queue. We have to design scheduling policy to ...
1
vote
1answer
78 views

Does the process exiting from critical section will always call signal instruction?

I have seen many solutions to critical section problems in process synchronization chapter . Many of them first acquire resources , execute critical section and leave . My Question is a process ...
0
votes
1answer
325 views

Does throughput includes CPU idle time also?

I have 3 processes P1,P2,P3 having gantt chart as follows => Now, CPU remains idle in 0 - 2 sec and 44 - 47 seconds as I/O is taking place. Does, this affect throughput as 3 processes can be ...
-3
votes
1answer
354 views

A Dead-lock in an Operating System is

A Dead-lock in an Operating System is Desirable process Undesirable process Definite waiting process All of the above My attempt: As "If a process is unable to change its state indefinitely because ...
3
votes
1answer
2k 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 ...
-3
votes
1answer
2k views

Why does the interrupt disable method to achieve mutual exclusion not work for multiprocessor systems?

The interrupt disable method to achieve mutual exclusion works for uniprocessor systems. Why does the interrupt disable method to achieve mutual exclusion not work for multiprocessor systems?
2
votes
0answers
141 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 ...
4
votes
0answers
268 views

Are these modern operating systems monolithic or microkernel?

I know that (at least at its conception) Linux and Mac OS were both monolithic kernels. My question is, what kind of kernels are Linux, Mac OS, and Windows today and why?
0
votes
1answer
1k views

Mapping an address to a cache block

A cache with 64 blocks(block0 to block63) and each block of size 16 bytes (or 4 words). This is what I think of the address arrangement, if it is byte addressable. block0 has addresses: 0, 64, 64*...
1
vote
2answers
737 views

Question on Virtual memory and Physical memory

This is the question where I'm stuck: With a 32-bit virtual address, 4 KB pages(12 offset bits), and 4 bytes per page table entry, we can compute the total page table size: Number of page table ...
2
votes
2answers
2k views

Does a simple calculator require an operating system?

I don't mean a TI-84 type calculator, and I also do not mean a simple calculator app on your phone. Does a basic scientific calculator require an operating system?
2
votes
2answers
6k views

Bankers Algorithm-Is the system in safe state?

Could somebody please provide a step-through approach to solving the following problem using the Banker's Algorithm? A system contains 10 units of resource class Ru. The resource requirements of ...