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

learn more… | top users | synonyms

1
vote
1answer
34 views

What type of an algorithm is being used for directory structure scanning?

So after learning about DFS and BFS yesterday in my class I was curious as to how is scanning on various file system being done. I spent quite a bit of time trying to look for some references on the ...
-3
votes
0answers
30 views

Swapping technique

We have these holes memory which uses swapping technique : 7 MB, 15 MB,10 MB ,9 MB,7 MB,12 MB.Which hole is taken for a) 13 MB b) 12 MB using first fit,worst fit,best fit,next fit a) for 13 MB ...
-2
votes
0answers
11 views

Second desktop other OS [migrated]

I want to Dual Boot Windows 10 and Kali Linux. That is not a problem, but I don't want to turn off my PC to get into Kali Linux. I want that if I'm on Windows 10, Kali Linux is in the second desktop. ...
0
votes
1answer
13 views

Not sure about a part of an answer - page table size question

Below is a question and answer that I'm reviewing. I understand most of it but I'm not clear where the 8 bits for the PTE size came from in this part... ...
0
votes
1answer
19 views

What happens under the hood when the process requests operating system to open a file?

Suppose a process wish to open a file named test.txt. So it issues a system call requesting Operating system to find the file on disk,and to grab the handle of file to operate on it. My question is ...
-4
votes
0answers
16 views

Help with Memory question [closed]

A cache is 8K (213) bytes in size and has a 16 byte line length. Main memory is 64 Mbyte (226) and is byte addressable. Show the format of a main memory address for: (i) Direct Mapping; (ii) ...
1
vote
1answer
30 views

Effect of Copy-On-Write on 2 processes sharing address space

I am studying operating systems and was going through Copy On Write mechanism. From Wiki: When one process modifies the memory, the operating system's kernel intercepts the operation and copies ...
1
vote
1answer
13 views

How does Logical Block Addressing affect OS disk scheduling optimizations such as SCAN (Elevator Algorithm)?

If the OS is scanning from one edge of the disk to the other, doing so from behind the Logical Block Addressing (LBA) abstraction, although it may aim to service requests in an elevator-like way, what ...
0
votes
2answers
39 views

Key differences between interactive and time sharing operating systems?

Couldn't find much online on how an interactive system is different from a time-sharing system, or the different traits of both. My understanding of a time-sharing system is many people at terminals ...
1
vote
1answer
23 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
34 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
51 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
1answer
29 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 ...
3
votes
1answer
27 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
48 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
44 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
1answer
41 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
39 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
44 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
32 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
38 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
28 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
26 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
25 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
49 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
50 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
52 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
69 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
95 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
73 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
1answer
96 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
268 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
110 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
231 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
40 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
102 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
78 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
231 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
96 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
93 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
209 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
143 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
42 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
46 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
86 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 ...