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

learn more… | top users | synonyms

1
vote
1answer
20 views

Address space definition

I'm learning by my self about OS theory and I have some troubles to understand what is a process address space. So far, I came across two definitions of what a process address space is: 1 - The set ...
1
vote
1answer
27 views

What are logical addresses and where do they actually reside?

While studying about memory management, paging and segmentation there is a lot of usage of phrases like CPU generates logical addresses and ...
1
vote
0answers
5 views

Thread states linux vs windows [migrated]

Linux has: ready, blocked, running, terminated. Windows has: Ready, Deferred ready, Standby, Running, Waiting, Terminated, Initialized. Why does Windows have so many states? What advantage does this ...
0
votes
1answer
45 views

finding maximum virtual and physical memory

If the following is given: CPU uses a four-level hierarchical page table, each level can contain 512 entries the page size is 4KB. virtual address is 48 bits How do i get the size of the ...
1
vote
0answers
7 views

What is the on-demand mapping in the kernel virtual memory in Linux? [migrated]

In the OS lecture, the lecturer explained that not all the physical memory will fit into virtual address space on a 32-bit architecture. So what the kernel can do is map anything else above 896MB ...
1
vote
1answer
23 views

How does the OS Scheduler give/take control of HW?

Imagine a uniprocessor system with a simple operating system with non-threaded processes and basic virtual memory (paging, no segmentation, no replacement to disk, etc). Now assume a simple ...
2
votes
1answer
24 views

Why do ACLs (access control lists) have better persistence than capabilities?

Although I understand the principles on which both ACLs and Capabilities operate, I do not see why on system restart it would be favourable to store privileges by using ACLs, instead of capabilities ...
1
vote
1answer
41 views

Confusion in Banker's Algorithm: How resources are allocated?

I have seen examples about Banker's Algorithm from this Wikipedia link, this book and many other places. In all these examples some processes are allocated ...
0
votes
1answer
42 views

Is emulation and/or virtualization faster when the host and guest systems are more similar?

Is emulation and/ or virtualization performance faster when the guest and host OS are similar? If yes, how big, relatively speaking, is the difference? And whether the answer is yes or no, why is it ...
3
votes
0answers
26 views

Deadlock avoidance: How does the system know in advance about the number of resources required by a process?

While studying about Deadlock Avoidance I came across a paragraph which states as given below: When the system needs to issue any resource to any process, then ...
2
votes
1answer
36 views

How does RAID-5 algorithm locate the right device?

Please consider the following diagram of a RAID-5 array (Ignore the gray background): Now, given a logical address, how can one return the device number (0-3)? For example, ...
3
votes
1answer
36 views

What is the difference between “deadlock prevention” and “deadlock avoidance”

I have studied about both of these on many places like this, this and this, but still it is not that much clear that what the actual difference is between these two. The Wikipedia links (first and ...
3
votes
1answer
28 views

Falsifying the “Circular Wait” Condition - Deadlock Prevention

In the Circular Wait condition for Deadlock Prevention section of this, it is described as follows: One way to ensure that this condition never holds is to ...
1
vote
2answers
36 views

Language that system calls are implemented in

Lately, I have been reading about operating systems design. The idea that all user space programs utilize Kernel services via a "System Call Interface" have got me thinking further into this. Is ...
-1
votes
1answer
25 views

Two threads are waiting on a mutex. Which one is unblocked?

Suppose there are three threads A, B, C and thread A has acquired a mutex lock and it is processing. If threads B and C try to acquire the same mutex, they will be blocked according to the mutex lock ...
1
vote
1answer
21 views

Confusion in the solution to first readers-writers synchronization

I am studying the solution to “First Readers-Writers Problem” from the book Operating System Concepts (9th edition) and it describes: First readers–writers problem, requires that no reader be kept ...
1
vote
1answer
19 views

How to choose waiting process in a preemptive priority-based scheduler

If my CPU schedule is preemptive priority, and I have no new processes coming, how I should choose from the waiting processes?
3
votes
2answers
53 views

Why is word-addressable the exception, not the rule?

As stated on Wikipedia: Most modern computers are byte-addressable instead of word-addressable. Why is this case? Since the CPU processes words (of predominantly 64 bits or 8 bytes) now, ...
0
votes
0answers
18 views

What are the parts of an object module and how do they work with a linker?

I'm trying to figure out how a linker works (after the compiler and assembler have finished processing a module). In my class notes we are given an example of a target machine that is word addressable ...
-3
votes
2answers
46 views

What's the difference between clock replacement & LRU replacement?

As title. When we want to request following page numbers 2,4,4,2,5,2,1,1,3,1, is clock replacement better? What are the advantages and disadvantages of them? Thanks~
0
votes
1answer
47 views

Why is the processes address space a continuous block in RAM?

I need some clarification regarding how the process address space is organized in memory. I went through basic concepts of virtual memory and adress translation and according to the size of the page, ...
1
vote
4answers
49 views

Operating System - CPU scheduling Decisions

I understand that CPU scheduling takes place on 4 circumstances listed below: When the process changes state from Running to Ready Changes state from Running to Waiting Changes state from Waiting to ...
-2
votes
1answer
56 views

Difference between system calls, system call interface and API? [closed]

Lets take POSIX, whats the difference between POSIX API, libc and actual system calls?
1
vote
1answer
90 views

How and which component of an Operating System is responsible for the transition of a process from the blocked state to the ready queue?

A process in an Operating System is considered to occupy several states and a process transitions between these states. A scheduler is responsible for assigning CPU time to a process. However, a ...
-2
votes
1answer
65 views

Deleted data remains on a disk until? [closed]

I am little bit confused between the two answers below. What is the exact answer of this question? My query is, "Deleted data remains on a disk until...?" The data is overwritten; The recycle bin ...
1
vote
0answers
60 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 ...
-1
votes
1answer
33 views

Which process comes first?

Let's say we have 3 processes: Process 1 service time 6 arrival time 0 Process 2 service time 2 arrival time 1 Process 3 service time 5 arrival time 3 We know that: after 1 time, process 2 will ...
2
votes
1answer
197 views

Virtual Address and Physical Address Space

A machine has 48-bit virtual addresses and 32-bit physical addresses. Pages are 8K. How many entries are needed for a conventional page table ? The answer is 2^35 entries Why not (2^32) / (2^13) = ...
0
votes
1answer
99 views

Can you explain this exercise solution to me? [closed]

A process running on CTSS (Compatible Time Sharing System) needs 30 quanta to complete. How many times must it be swapped in, including the very first time (before it has run at all)? • Answer : The ...
2
votes
1answer
129 views

Highest Response Ratio Next (Scheduling Algorithm)

In CPU scheduling HRRN(Highest Response Ratio Next) algorithm chooses the next process to be scheduled using the formula (W+S)/S where W-> waiting time & S->Service Time. Can someone share their ...
2
votes
2answers
39 views

How can another process call $signal()$ when one process is executing $wait()$ in its busy waiting loop?

A semaphore is a variable that, apart from initialization is accessed through only two standard atomic operations wait(s) and signal(s). ...
1
vote
2answers
72 views

Difference between virtual memory and job pool

Both virtual memory and job pools store the processes temporarily on disk and bring them to memory at some later stage, so what is the actual difference in between them? What I guess is that when a ...
3
votes
1answer
70 views

How does the CPU know to get data from or send data to a peripheral device?

We were talking today, in Intro to Programming, about machine language. I know it's a bunch of 0's and 1's. Let's say I compile the following C++ program on an x86 machine: ...
1
vote
0answers
185 views

Operating system processes

I'm a bit confused about this question: "Multiple jobs can run in parallel and finish faster than if they had run sequentially. Suppose that two jobs, each needing 10 minutes of CPU time, start ...
0
votes
0answers
31 views

How cin and cout work in C++ [duplicate]

I am interested in knowing the blow by blow account of what happens from the time the compiler reads a text document containing a cout/cin command to the time the executable it generates is finished ...
0
votes
1answer
91 views

User level threads are transparent to the kernel?

Find whether given statement True or False? Explain. User level threads are transparent to the kernel? My attempt : False. Since, user level threads are managed by a user level library ...
0
votes
2answers
84 views

Is queue a storage allocation area in memory?

We mainly study about heap and stack data structures which act as storage allocation area in memory. Is it that queue is also a storage allocation area in memory? As far as I know, process control ...
1
vote
1answer
145 views

How does the OS determine the CPU burst time of a process?

This question is related to OS. After having solved many problems in CPU scheduling I was wondering how does the CPU know the burst time of all the processes in the main memory before executing them? ...
4
votes
3answers
129 views

When do deadlocks occur?

I was reading about deadlocks in Operating Systems. Where I came across two examples below. Circles with label $P_x$ are processes. Squares with label $R_x$ are resources. Each dot in the square ...
0
votes
1answer
40 views

How is out-of-order instruction execution related to superscalar execution?

How is out-of-order instruction execution related to superscalar execution? How is data hazard detection and handling affected by superscalar execution?
1
vote
2answers
43 views

Help understanding this algorithm that's supposed to solve the critical section problem through mutual exclusion

Our professor gave us the following algorithm that's supposed to solve the critical section problem. I'm guessing the code is just pseudocode so I'm not trying to focus on the strange syntax and just ...
-1
votes
1answer
82 views

In a $k$-way set associative cache,main memory block mapping in range?

In a $k$-way set associative cache, the cache is divided into $v$ sets, each of which consists of $k$ lines. The lines of a set are placed in sequence one after another. The lines in set $s$ are ...
0
votes
1answer
97 views

Why there must be a relationship between user threads and kernel threads?

The following is an excerpt from OS concepts by galvin.Here is the book. Multithreading Models Our discussion so far has treated threads in a generic sense. However, support for threads ...
0
votes
2answers
78 views

Why can't CPU access secondary memory [closed]

I have read in my subject "Operating Systems" that CPU can't access secondary memory. Any program that is stored on secondary memory is executed once its retrieved from secondary memory to primary ...
0
votes
1answer
162 views

Which addressing modes permits relocation without any change whatsoever in the code?

An exercise problem stated that : Which of the following addressing modes permits relocation without any change whatsoever in the code? Indirect addressing Indexed addressing Base register ...
5
votes
1answer
422 views

Minimum number of processes for the deadlock?

A system has 6 identical resources and $N$ processes competing for them. Each process can request atmost 2 requests. Which one of the following values of $N$ could lead to a deadlock? 1 ...
0
votes
1answer
82 views

What is the effect of operating systems on execution speed?

I'm using a Raspberry Pi 2 which works with 900MHz. (Asked this question there and they think it belongs to cs) My question is: since it also runs an operating system in the background, I expect this ...
5
votes
3answers
590 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 ...
1
vote
0answers
48 views

Processes running in Distributed Systems (Advanced Operating System)

I had a test today, there was a question that was a bit confusing. Anyway I am asking the question, from memory, and explaining what I answered. It would be great if someone could explain if I did ...
2
votes
1answer
96 views

Best Fit Memory Allocation Algorithm Statistical Analysis

I've been reading book on Operating System, in which author writes : Somewhat surprisingly, it(Best fit) also results in more wasted memory than first fit or next fit because it tends to fill up ...