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

learn more… | top users | synonyms

-2
votes
1answer
34 views

Difference between system calls, system call interface and API?

Lets take POSIX, whats the difference between POSIX API, libc and actual system calls?
1
vote
1answer
77 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
29 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
votes
0answers
32 views

Page Table Size

Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the page size is 4KB, what is the approximate size of the page table? ok see... no. of page table entries(PTE) = ...
0
votes
0answers
35 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
30 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
84 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
42 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
34 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
36 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
46 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
38 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
67 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
30 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
58 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
70 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
60 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
105 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
38 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
38 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
71 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
82 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
62 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
107 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
315 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
58 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 ...
4
votes
3answers
181 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
34 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
60 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 ...
1
vote
2answers
66 views

Can a second process execute when the Operating System is performing a context switch?

A process was running on a uniprocessor system. It is being context switched. While the scheduler is performing this context switch can another process be allocated the CPU while the context switch is ...
1
vote
2answers
57 views

use of C library in operating systems [closed]

I wonder, how is that operating systems make use of libraries as stdio.h if they themselves are the services? I am right? Is the operating system that interacts with the hardware to operations of I/O? ...
2
votes
1answer
22 views

Operating Systems TestAndSet instruction

I was reading operating systems concurrency control topics where I came across TestAndSet() intruction. I first referred this book. But it has got very less ...
1
vote
0answers
9 views

What type of virus protections are available and their suitability to a cyber-security company. [closed]

What type of virus protections are available and their suitability to a cyber-security company. I'm talking about top notch stuff. Are there any methods or techniques that are rare or unusual? Othere ...
3
votes
2answers
83 views

Difficulty understanding pre-emptive vs non-preemptive CPU scheduling

I'm having difficulty understanding what my book is trying to say in regards to preemptive and non-preemptive CPU scheduling. It says the following: CPU Scheduling decisions may take place under ...
3
votes
1answer
45 views

Priority inversion in Hoare and Mesa monitors

I understand the difference between Hoare and Mesa monitors. However I don't understand why priority inversion (when a lower priority process gets done before a higher priority process) is possible in ...
3
votes
1answer
37 views

Can starvation occur with interrupts?

The Computer Science text book I own describes how an interrupt is handled in an operating system: At some point at the end of an instruction the processor checks if there are any outstanding ...
2
votes
1answer
380 views

Why do we use stacks and not queues on system-level?

From low OS-level function calls, to memory allocated to an application, all will primarily take a stack to perform LIFO operations. Why don't we use queues and FIFO operations? It's just a matter of ...
1
vote
2answers
62 views

Can the memory cache hold instructions?

My teacher told us that when the ram runs out of space it will push a program in the cache, i argued that the program should go to the swap space in the hard drive, plus the memory cache cannot hold ...
1
vote
0answers
140 views

Solving for Hit Ratio of a Theoretical Memory System

Long time lurker, first time poster. The book I am reading is William Stalling's "Operating Systems: Internals and Design Principles" Seventh Edition. Stalling's definition of hit ratio according to ...
0
votes
0answers
134 views

How do you calculate when effective access time is greater than cache access time?

I'm having trouble understanding how to calculate effective access time, hit ratios and cache access times. I'm unfamiliar with the concepts and would love help, or an explanation on how to solve this ...
2
votes
1answer
276 views

Provide some help regarding the “Dining Philosophers Problem”?

I have an assignment based on operating systems and the question is divided into two sub-questions. The first is: Prove any seating arrangement of lefties and righties, with at least one of each ...
2
votes
1answer
127 views

Starvation Condition in CPU/Process Scheduling?

Let's say OS is using preemptive CPU scheduling. A process P1 gets a chance to run for some time and then next higher priority process comes and preempts P1. After that higher priority processes are ...
3
votes
1answer
183 views

Using a counting semaphore as a binary semaphore

Are there any methods, so that I can use a counting semaphore as a binary semaphore? A binary semaphore should have two possible states: 0 and ...
1
vote
1answer
56 views

Can the processor just turn off the interrupt request line?

I was doing some of the interrupts question online and found this Multiple choice question How can the processor ignore other interrupts when it is servicing one a) By turning off the interrupt ...
7
votes
1answer
73 views

Page management in OS kernels

I looked at some old OS theory books of mine and noticed that one glaring omission in all of these OS books is how to actually keep track of physical pages that are free (i.e. algorithms for actually ...
2
votes
2answers
235 views

Can someone explain this diagram about Slab Allocation?

I'm trying to understand how Slab Allocation works and why it is different or better than ordinary paging. I found this diagram which I believe would be helpful if it had more explanation. Some ...
5
votes
3answers
683 views

Why unsafe state not always cause deadlock?

I was reading Operating Systems by Galvin and came across the below line, Not all unsafe states are deadlock, however. An unsafe state may lead to deadlock Can someone please explain how ...
11
votes
3answers
1k views

How can the Operating System run on the same chip it is supposed to be managing?

From my readings about Operating Systems (reading the basic material on Wikipedia, tech sites, etc) I've learned that the Operating System is a program that allows programs and applications to ...
0
votes
1answer
69 views

Understanding Logical to Physical Addressing

I am trying to understand the concept of logical to physical addressing. I am given 72 physical addresses (0-71) with values A virtual address = 2^(p+w) p = page bits w = word bits I know the page ...
5
votes
1answer
60 views

For a given certain situation how to prove that the system will never get into the state of Deadlock

The situation is as follows 'm' process shares 'n' resources of same type. The maximum need of each process does not exceed 'n' and the sum all their maximum needs is always less than m+n. In ...