Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
1answer
21 views

Which Peterson’s Solution is right?

I have seen two different Peterson’s Solution to mutual exclusion, one is from Modern Operating Systems: ...
2
votes
2answers
52 views

Why does the operating system switch an active process to different cores?

When running a single-threaded application that is 'always busy', on a multi-core computer, modern operating systems will typically switch the process from one core to another from time to time. Even ...
0
votes
0answers
15 views

Compile time and load time address binding vs Execution time address binding

The address generated by CPU is called logical address and the address seen by the memory unit is called virtual address. The compile and load time address binding scheme results in an environment ...
0
votes
0answers
18 views

Why the maximum file size of a FAT32 formatted volume is 4GB in windows OS? [migrated]

The size of File Allocation Table(FAT) depends on the number of clusters, the version used, the size of volume used. For example, a volume with size 8GB and formatted as FAT32 with 4096 bytes sized ...
1
vote
1answer
21 views

Are space allocated to C/C++ variables in secondary storage also in Compiled file?

Are data segments,heap,stack etc also present in secondary memory with compiled code then later mapped by OS to RAM when I open it?
-1
votes
0answers
14 views

Disk capacity and data transfer speed without sectors?

A certain moving arm disk-storage device has the following specifications: Number of tracks per surface=404 Track storage capacity=130030 bytes. Disk speed=3600 rpm Average seek time=30 m secs. ...
0
votes
0answers
24 views

What does it mean by “two memory accesses” in this paging question?

I've been assigned the following question about paging. What does "two memory accesses" mean? Consider a system with a 2-level paging scheme in which a regular memory access takes 150 nsec and ...
0
votes
1answer
17 views

If the process virtual memory space is for that process only, how can it access functions inside other processes?

So i heard that by using buffer overflow and re writing the return address inside our stack, we can write the address of another process and therefore jumping to that malicious process(the return ...
0
votes
1answer
15 views

How can a user process even try to access a memory location its not allowed to when it doesn't have access to page table?

So is it even possible for a user process to even try to access a physical memory location that does not belong to it and therefore getting an error by operating system? because for example with a 32 ...
0
votes
0answers
13 views

Process PCB vs PEB

I would like to know the difference between the PCB and the PEB of a process, I understood the process control block to store information about how to process a particular process. I still do not have ...
0
votes
0answers
23 views

Questions about static and dynamic library linking? [on hold]

when i include a library like stdio.h with < include > at the beginning of my program, is this an example of static linking? when i use < include> and i run the program, will that entire ...
0
votes
1answer
78 views

How pictures and videos are usually loaded in Memory? [closed]

Lets assume I'm talking about Jpeg and Mp4 and a general video player(not sure if different ones load it differently, if they do please tell) So do video players (process) usually load the entire ...
-1
votes
0answers
29 views

Does process synchronisation require an indivisible machine instruction?

Any implementation of a critical section requires the use of an indivisible machine instruction, such as test-and-set. Is this true or false? I know test-and-set is a hardware thing but there's also ...
-1
votes
0answers
18 views

Virtual Memory numerical problem

In a two-level virtual memory, the memory access time for main memory, tM=10^−8sec, and the memory access time for the secondary memory, tD=10^−3 sec. What must be the hit ratio, H such that the ...
1
vote
1answer
37 views

Can a safe state in Banker's Algorithm cause deadlock eventually?

I know that unsafe state does not always mean deadlock. That is a situation that banker's algorithm does not detect deadlock accurately. I am just wondering if there is any example of a safe state ...
0
votes
0answers
41 views

What is the difference between a trap and an exception?

I thought I know the difference between an exception and an interrupt, but I came across the term "trap" and it seems relatively the same as an exception. Even wikipedia explains it as an exception: ...
0
votes
1answer
37 views

Page Replacement optimal verses MRU

A computer has twenty physical page frames which contain pages numbered 101 through 120. Now a program accesses the pages numbered 1, 2, …, 100 in that order, and repeats the access sequence THRICE. ...
-1
votes
1answer
20 views

Desktop Manager for Kali Linux [closed]

Why has recently Kali Linux dropped Gnome as its default desktop management system? Note that this also imply the change in Package Management System.
1
vote
1answer
29 views

Fork() execution and number of processes

If a process executes the following code fork(); fork(); fork(); The total number of child processes created is given as 7 by a text book. But how does that ...
-1
votes
0answers
14 views

What does the locale look like “under the hood” and how to access them?

I want to know what locales look like (their format), how to access them - are they files that can be freely read or do I have to "ask" an OS for that? How different they are on Windows and Linux? ...
0
votes
0answers
10 views

How a process is changed from waiting state to ready state after system call?

I heard that a process which was blocked because of I/O operation (even though it is also a part of system call) is changed to the ready state by a device driver. (In this post) Then how about ...
1
vote
0answers
23 views

Software and hardware communications [closed]

When you install an OS on a piece of hardware such as a Macbook, what is happening logically? In other words, how does the software "talk" to the hardware? Is it the same logical process with every OS ...
4
votes
1answer
65 views

Are multiple interrupts generated when I hold down a key on my keyboard?

When I hold down a key on my keyboard, a continuous stream of characters is generated and is displayed on the text editor, Now since pressing a key is a hardware interrupt, so does holding down a key ...
0
votes
1answer
34 views

Processor pipelining question: number of instructions per second

A question from the textbook Modern Operating Systems by A. S. Tanenbaum reads as follows: A computer has a pipeline with four stages. Each stage takes the same time to do its work, namely, 1 nsec. ...
1
vote
0answers
108 views

What is the real advantage of Google's new Fuchsia operating system kernel?

Google's new in-production OS which it desires to replace not only Android but many other devices utilizes a completely new kernel: The code differs from Android and Chrome OS due to its being ...
1
vote
1answer
29 views

What is the mathematical principle of buddy algorithm?

The buddy algorithm is: The buddy for any block of size $2^k$ is another block of the same size, and with the same page frame number except that the kth bit is ...
0
votes
0answers
38 views

Calculating number of page table entries

The question is from Modern Operating Systems 4th edition, by Andrew S. Tanenbaum and Herbert Bos. Chapter 3 exercise number 15. Suppose that a machine has 48-bit virtual addresses and 32-bit ...
4
votes
1answer
76 views

What's the difference between user registers and kernel registers?

I am reading Operating Systems: Three Easy Pieces, but I can't fully understand the following paragraph. It's from the 6th chapter of the book. I think it's self-contained, so I quote here. Note ...
1
vote
1answer
32 views

Can a process run if there's not enough space for minimum pages?

I'm studying OS and I came up with this scenario where the OS works with a paging scheme and virtual memory, and a process wants to start running, but in memory, there's not enough space to allocate ...
1
vote
0answers
31 views

How is context switching disabled in a process?

By what provision is context switching disabled in a process ? Or is it the case that if a process is in in kernel mode , context switching is disabled by default ?
-2
votes
1answer
26 views

OS process management

Assume a process execution interrupted at the middle and CPU started executing a different process.How does the OS handle this situation?
-1
votes
1answer
51 views

why do we run out of heap space even if we have virtual memory?

Whenever we try to get space in heap(using malloc or new) we can get out of heap space error if it exceeds the limit. But, we have virtual memory so why can't OS allocate that much space and then do ...
0
votes
1answer
57 views

Peterson Algorithm for process synchronisation

Consider Peterson's algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below. repeat ...
0
votes
1answer
65 views

What is hardware trap?

Since it's called a trap I consider it caused by software, so why it's called a hardware trap? And how does it work?
1
vote
0answers
11 views

Operating System: Redundancy of implement a monitor using semaphores in my textbook?

Why the part highlighted the following picture is need? I've been trying to follow to logic flow of it as follow: Imaging a Situation: Two processes enter/call F, first A, second B: Process A: <...
2
votes
0answers
21 views

Operating System: Busy waiting is not eliminated with semaphore?

Why the busy waiting is not eliminated even after we put the current process into the process list and "block()"ed it? So even if the process is in waiting state we still call it "busy waiting"? I'm ...
0
votes
0answers
13 views

Operating System: Confusion about scheduler activation?

According to the highlighted text followed, a new virtual process is created and it will save the state of the blocking thread, then the upcall handler schedules another thread that is eligible to run ...
3
votes
1answer
56 views

Operating System: About user thread and kernel thread?

Is that a "thread" consists of both "user thread" and "kernel thread" as two parts? And when I create a "thread", is that I create a "user thread" and another "kernel thread" is created "in the ...
0
votes
1answer
32 views

Operating System: replace the process's memory space with a new program

What does it mean that "replace the process's memory space with a new program"? So who's memory space will be replaced by whom?
3
votes
1answer
92 views

How do modern Operating Systems detect process starvation?

So first off do the modern operating systems like windows and linux have a method for detecting starvation? if not, why? and if they do, then how are they going to detect starvation of a process? (...
0
votes
0answers
28 views

Notion of CPU burst in Time Sharing Operating Systems

As far as I understand OS calculates the CPU burst of a process based on its historical values and then may use algorithms like SJF etc for scheduling. But what if the OS is time sharing, where the "...
0
votes
0answers
18 views

Effective memory access time in case of multi-level paging with virtual memory

In multi-level paging with virtual memory, If I am using local page replacement algorithm (which I think is practically used), then there is no priority followed and pages at higher level can be ...
1
vote
0answers
23 views

Why isn't a process's PCB present in its memory?

I checked wikipedia PCB and its written that - Since PCB contains the critical information for the process, it must be kept in an area of memory protected from normal user access. In some operating ...
2
votes
2answers
62 views

How is space from malloc allocated?

Whenever we load a process (which consists of object code, static and global variables, stack and heap space) into main memory it would be of fixed size. But, the program doesn't know in advance how ...
0
votes
3answers
69 views

Is it 100% OK to say “All software doesn't need to know the system lower than the architecture level”?

Most of you know this diagram. If this diagram is true, all software is free to not know the levels lower than ISA. But it's not true. Softwares like performance-critical programs or system softwares ...
0
votes
1answer
27 views

Linux OS/HW VM cooperation

From what i've learned, the HW is responsible for setting the accessed and dirty bits in the PTE of a process, and the OS is responsible for turning them off. My question is why? The first part, i ...
0
votes
1answer
30 views

How does the TLB identify a particular process?

I have read that the translation lookaside buffer (TLB) is implemented in hardware and stores the page numbers and the corresponding frame numbers for faster lookups. Now suppose there are two ...
3
votes
1answer
77 views

What is the benefit of using one to one thread mapping model instead of Many to Many or two level?

So in the silberschatz O.S book it says Windows uses one to one model (mapping user level threads to kernel level threads) but why? i thought many to many and two level models are much better, ...
1
vote
0answers
38 views

Why operating system needs interrupt stack, if it has process control block?

I'm reading about an operating system but some concept confuses me. What doesn't confuse me: When an interrupt or system call or processor exception occurs, it happens when user mode tries to ...
0
votes
1answer
66 views

What is the relation between Time Sharing operating systems and Round Robin CPU scheduler?

So i have asked this before, but i still didn't get my answer so I'll try to make my question more clear this time : Based on my O.S book, Time sharing operating systems switch between processes ...