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

learn more… | top users | synonyms

-1
votes
0answers
18 views

How does first instruction get executed in virtual memory environment?

Currently I'm reading about virtual memory , Now I'm stuck at how CPU generate first virtual address for a process ? how page table is formed ? How this setup had been made?
1
vote
0answers
33 views

Understanding N process Peterson's algorithm

The intuitive informal description of two process Peterson's algorithm for process 0 can be given as follows: ...
1
vote
0answers
22 views

Bounded waiting and progress requirements of critical section problem solution based on exchange instruction

Atomic exchange instruction is given as follows: void exchange (int *a, int *b) { int temp; temp = *b; *b = *a; *a = temp; } Now consider the ...
0
votes
2answers
55 views

How does the CPU receive, process and output information?

I was studying the I/O process of a PC...and I think I understood it..but not very much so I will type what I understood giving an example..and I hope that I got it right e.g. typing with a keyboard ...
0
votes
1answer
22 views

How many bits are needed? Advantages/disatvantages of this configuration?

So the question is: Assume we had 15 CPU instructions and, for each instruction, we were trusting one particular component of the kernel to handle it. How many modes do we need to support (including ...
2
votes
0answers
34 views

When you first start a system boot, are you in kernel mode or user mode? Why?

I'm confused as to what mode computers boot in. My thought process was that since kernel mode is effectively the base layer of protection for the computer, it would boot in kernel mode and then load ...
1
vote
0answers
22 views

How are LRU and Clock algorithm different?

I am modeling the Gclock-pro buffer replacement algorithm in Linux kernel. Because there are many existing modeling works on LRU, I am considering adopting LRU model to roughly describe Gclock-pro, ...
1
vote
0answers
28 views

Could an OS relinquish control back to the bootloader?

I'm wondering if it is feasible for an OS to return control back to the bootloader, and boot a second OS after itself. Reason being -- I've been musing on bootkits, and wondering if it would be ...
4
votes
2answers
39 views

Is bounded waiting ensured in given version of Dekker's solution for critical section problem?

William Stallings discuss various step by step process in developing Dekker's algorithm in his Operating Systems book. In process, he reaches to following version of algorithm (which is incomplete as ...
-1
votes
2answers
32 views

How many times do we access memory with a TLB?

As I understand it, when we are on a virtual memory based system, we have to access memory 2 times (one for the Page Table and one for the physical address in RAM). But, how many times would we have ...
-4
votes
0answers
27 views

What does “translation time” mean in this problem statement?

I'm trying to answer a question I've been set about the time taken by a program that makes a certain number of memory requests, leading to some page faults and some TLB faults. The question says, ...
3
votes
0answers
30 views
-1
votes
0answers
17 views

Which combination of the following features will suffice to characterize an OS as a multi-programmed OS

Which combination of the following features will suffice to characterize an OS as a multi-programmed OS? More than one program may be loaded into main memory at the same time for execution. If a ...
4
votes
3answers
2k views

A multi-user, multi-processing operating system cannot be implemented on hardware that does not support

A multi-user, multi-processing operating system cannot be implemented on hardware that does not support Address translation DMA for disk transfer At least two modes of CPU execution (privileged and ...
-1
votes
1answer
49 views

How many pages does the page table require?

I have found this exercise on the Internet but I´m having problems with sections 4 and 5, because I don´t understand where do the solutions appear from. Example: Mapping VAs to PAs Suppose - ...
0
votes
1answer
22 views

Difference between word logical addressing and byte logical addressing in this exercise?

I´m new here and this is the first question I´m posting (hopefully this is the correct site). I have the exercise below: Consider a virtual address space of 10 pages of 1024 words each (1 word = 2 ...
1
vote
0answers
62 views

Indexed allocation in operating system file management

In the index allocation scheme of blocks to a file, the maximum possible size of the file depends on : Options: A]The size of the blocks, and the size of the ad­dress of the blocks. B]The number of ...
0
votes
0answers
21 views

clustering disk pages In the most I/O efficient manner

Let's suppose there're consecutive 5 disk pages (each disk page size = 8KB). P0 P1 P2 P3 P4 Among those 5 pages, we need to read P0, P1 and P3. There are three ways to load those pages: [1] Issue ...
1
vote
0answers
49 views

How do stack-based cache algorithms avoid Belady's anomaly?

I was going through page replacement algorithms from Galvin's Operating System book. I encountered this line about LRU: A stack algorithm is one in which the pages kept in memory for a frame set ...
1
vote
0answers
18 views

When was manual dynamic memory managment introduced?

Original Fortran only had static memory. Algol introduced stack allocation. Lisp had Garbage Collection. But when where manual dynamic memory management such as in C introduced. In C memory can be ...
0
votes
1answer
45 views

Where does the process reside in memory?

When a program runs in CPU, it turns into a process. In what kind of data structure is the process stored in a system memory? Heap or Tree or some other data structures?
1
vote
1answer
41 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 ...
0
votes
1answer
31 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
22 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 ...
2
votes
1answer
83 views

Can threads use resources from other processes?

This is how I see threads. Please do correct me if I'm wrong: A thread is a part of a process that runs a sequence of program code. There can be many threads within a process that run different ...
1
vote
1answer
33 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
17 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
71 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
30 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
56 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 ...
0
votes
1answer
64 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
35 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
31 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
63 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
47 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
44 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
45 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, DeviceByLogicalSector(50)...
3
votes
1answer
58 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
39 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
44 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
30 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
27 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
55 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, wouldn'...
0
votes
0answers
20 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
64 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
53 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
58 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
136 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
105 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 ...