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

learn more… | top users | synonyms

1
vote
2answers
53 views

Why don't hard drives actually delete data?

As far as I understand it, when you delete a file from trash/recycle bin the file isn't actually erased from memory but is instead marked as being okay to be over written. So, my question is as to ...
1
vote
0answers
21 views

How does OS know the physical address of a process' first memory page?

If I have a program, its instructions are stored on the hard drive. When I double-click the executable the pages of memory for this process must get loaded in to RAM. However, for the pages to get ...
19
votes
7answers
4k views

Does an Operating System inject its own machine code when you open a program?

I'm studying CPU's and I know how it reads a program from the memory and execute its instructions. I also understand that an OS separates programs in processes, and then alternate between each one so ...
-4
votes
0answers
24 views

Data segment allocation order worst fit [closed]

Processes are made up of code, static/dynamic data and stack. OS has to allocate the process P into memory. If it use worst fit allocation and there are 3 free partitions, which part of the process ...
3
votes
1answer
32 views

What is the difference between LRU implemented for a cache and for page replacement?

I have read that true LRU page replacement requires significant hardware support, so only approximation of LRU is implemented for page replacement. So I wanted to contrast LRU that is implemented for ...
0
votes
1answer
31 views

Name for almost random memory distribution on the heap

If I had a heap like the following: with blue blocks being occupied memory and white blocks being free memory What is the general name given to the situation illustrated, where the free and ...
0
votes
1answer
35 views

How is heap memory allocated to a process?

I want to better understand how OS provides heap memory to a process. Here by heap memory I mean the memory allocated dynamically, say by call to malloc. When a ...
1
vote
0answers
17 views

How can I talk about priority inversion if it's impossible to specify priority?

In the paper: Leslie Lamport: What It Means for a Concurrent Program to Satisfy a Specification: Why No One Has Specified Priority; ACM Symp Principles of Programming Languages, (POPL-12):78-83, ...
3
votes
1answer
58 views

Are cache contents specific to a process?

Suppose the L1 cache is filled up with data from some process. Now CPU loads another process. Does the new process share cache contents? Or the cache has to be invalidated completely in each context ...
7
votes
0answers
85 views

Can the end-to-end principle be formalized?

In the late 1990s, when I was in graduate school, the paper JH Saltzer; DP Reed; DD Clark: End-to-end arguments in system design. ACM Trans. Comput. Syst. 2(4):277-288, 1984. ...
2
votes
1answer
15 views

Access control matrices: who are the subjects: users or processes?

I'm studying the basics of security in computers. The doubt I have is that the access control matrix is presented as a matrix whose rows are the subjects and the columns are the objects. Also subjects ...
1
vote
1answer
33 views

How can OS schedule disk requests efficiently without knowing the LBN to PBN mapping ?

I learn from the OS schoolbook that the OS has the function that schedule the disk requests with the knowing algorithms such as SSTF, SCAN .. However, the date layout inner disk drives now is very ...
2
votes
1answer
27 views

Filing systems using index blocks

I know that a disadvantage of the index block system is that it can be wasteful of space if the files involved are mostly small in size, as index blocks are allocated from free space as required and ...
0
votes
1answer
59 views

Is the way an OS schedule threads related to parallel computing?

From Wikipedia: Operating systems schedule threads in one of two ways: Preemptive multitasking is generally considered the superior approach, as it allows the operating system to determine ...
0
votes
2answers
135 views

How does an operating system implement the C library?

I have an idea of how a C program is turned into machine code by the compiler. I also know how the processor processes the instructions (https://www.youtube.com/watch?v=cNN_tTXABUA this video has a ...
0
votes
1answer
53 views

How does an Operating System without kernel mode works?

Andrew S. Tanenbaum in his book "Modern Operating Systems 3rd Edition" states that the distinction between operating system software and normal (user mode) software can sometimes be blurred in ...
0
votes
0answers
157 views

size of memory in 64-bit computer system

I'm new here, a brief intro, I'm a student majoring in comp-sci. Right now I'm having a bit confusion to answer one of my assignment, it is about system paging. I want to know how do I able to know ...
2
votes
0answers
49 views

How hardware interrupt works on music

Does music stop for a short interval while listening into it,maybe a milliseconds that we just doesnt sense it cause by interrupts for operating system to run other programs
4
votes
2answers
61 views

Does the OS create its own bootstrapped stack frame when running a program?

I've been doing nand2tetris exercises and I'm quite interested in how compilation actually works. In nand2tetris when creating the VM language I had to create a "bootstrap" which called the main ...
1
vote
1answer
34 views

Can a computer game can run on a boot mode without the aid of os? [closed]

I meant that that the game programmer can just add its own code to the game to manipulate its own low level function as the operating system does provide in a common executables,and load it into the ...
2
votes
2answers
267 views

Why can't I run a mac program natively on windows? [closed]

Basically, I believe that if you have something like a .dmg file the OS opens it with a certain program which takes the code behind it and does things to it. So why couldn't you then take the program ...
1
vote
1answer
20 views

What memory locations will the CPU fetch instructions from with instruction length of 16bits

While reading Stallings OS Internals and Design, I run into problem. Here is example from the book. For example, consider a simplified computer in which each instruction occupies one 16-bit word ...
0
votes
1answer
33 views

Maximum possible file size in the filesystem [closed]

A file system with 300GByte disk uses a file descriptor with 8 direct block address ,1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size ...
0
votes
1answer
44 views

Issue with Multithreading spin locks

a spin lock solution to the critical path problem is shown below . my question is will this or will this not result in starvation ? ...
3
votes
1answer
62 views

Why does making a seemingly insignificant edit to an executable's machine code return errors? [closed]

First of all, I would like to apologize if this question is in the wrong section. For all I know, it could be placed in Super User, Reverse Engineering, or Stack Overflow. Now lets get back the ...
1
vote
2answers
68 views

Which part of the computer allocates memory in RAM?

When we declare a variable there will be a random part of memory will be allocated in RAM. Which component will allocate the memory? Is the processor or any other specific hardware doing the ...
0
votes
1answer
49 views

Hierarchical Paging memory requirements

OS Book written by Galvin et all states that if page size is 4KB and size of virtual space is 32 bits then 2^(32-12) page entries would be required which is too huge to store in memory!! Therefore ...
1
vote
1answer
155 views

Starvation in longest remaining time first CPU scheduling

I want to know if longest remaining time first (LRTF) CPU scheduling has starvation or not. Also give reason how it starve/does not starve a process. I know longest job first (LJF) may starve a ...
0
votes
2answers
285 views

Deadlock and cycle in a resource allocation graph

Here is a resource allocation graph asked in my Operating Systems Theory midterm. The question is, "Is there a deadlock here? Explain your answer in detail" Ra and Rb are resource sets and every ...
2
votes
2answers
131 views

What is Simultaneous Multithreading

I come from an electronics background. I know that there are three types of implementations of multithreading (see Computer Architecture: A Quantitative Approach, 5th Edition): Fine-grain ...
1
vote
2answers
59 views

Is there a way to compute time without system clock

I was thinking about any method where we can use RAM I/O speed, to calculate time, let's say for example: RAM transfer rate is 1000 MB/s, so when it's half full (about 500 M Bytes written), by ...
0
votes
1answer
203 views

Exponential averaging for SJF CPU scheduling

Calculate the exponential averaging with $T_1 = 10$, $\alpha=0.5$ and the algorithm is SJF with previous runs as $8,7,4,16$. 9 8 7.5 None I am getting 4. None as the answer. ...
0
votes
1answer
57 views

How do context switches factor into CPU utilization?

When studying operation systems, is context switch time included in CPU utilization time? For example, if 5 percent of CPU time is wasted to context switching, is CPU utilization 95 percent?
2
votes
2answers
82 views

Is there a shell between the kernel and hardware

First and foremost, i know what a shell, kernel is. Now the dilemma. Today i had my systems viva in college. The examiner asked me is there a shell between the hardware and the kernel. Obviously, i ...
0
votes
2answers
322 views

How to determine the maximum RAM capacity for an operating system?

I was curious to know what limits the max RAM capacity for an OS while reading about microprocessors being 32-bit and 64-bit. I know that limit for 32-bit OS is 4GB and for 64-bit OS is 16 Exabytes, ...
0
votes
1answer
59 views

compiler interaction with OS [closed]

I want know if compiler interacts with operating system during compilation process.And if yes then which part of compiler interacts with which part of operating system
3
votes
1answer
116 views

Confusion about compiler and assembler

I have two questions. After compilation of any C program result is assembly language code which should depend on processor. So my question is: how do different computers with different processor ...
1
vote
2answers
100 views

How to structure device driver software?

I'm asking here for both the scientific, programmatic, and structural format of a device driver. What does that mean? Basically, I'm not asking how to write a driver in general ... I'm asking how to ...
-1
votes
1answer
88 views

Does virtual address space resides in virtual memory?

I have several confusion like : Does virtual address space resides in virtual memory ? Does each process has its own virtual address space like each process has its own virtual memory and own page ...
-1
votes
1answer
63 views
2
votes
2answers
2k views

Difference between multitasking, multithreading and multiprogramming

I was a little confused between these three terms Multitasking, Multithreading and Multiprogramming Although every one means executing different lines of codes, and for every one we need something ...
0
votes
1answer
55 views

Task Manager Performance tab in windows [closed]

I do not understand the following options in windows. Could any one explain
1
vote
1answer
74 views

Is it possible to do multitasking without context switch with just one cpu?

All the article I can find seems to talk about multitasking and context switch as its a two different thing. It seems that multitasking and context switch are the same thing.
0
votes
1answer
150 views

What happens when time slices are too short or too long?

What bad things can occur when the lengths of the time slices in a multitasking system are too small? What can happen when they are too big? How should the length of the time slice be chosen?
0
votes
1answer
318 views

Valid-invalid bit in a process page table

Valid-invalid bit is used to indicate whether a page in a process’s page table is valid or not. Why is it needed? Does that mean that each page table has a certain minimum size, i.e. it can ...
1
vote
1answer
80 views

Do Kernel-Mode Windows Services Considered Part of Kernel?

I learned that there are two types of services in Windows , one called -service- which is in user-mode , other is called -driver service / device driver- which is in kernel-mode. What I wonder is , ...
1
vote
1answer
97 views

Algorithm for wait-for graph

During the process of deadlock detection, the wait-for graph can be obtained from the resource-allocation graph. To detect whether there is a deadlock using the wait-for graph, can topological sort be ...
4
votes
3answers
332 views

Solutions to synchronization problem need to be executed in critical section

I was reading about synchronization problems for cooperating processes and i learned that only hardware solutions like test_and_wait() and ...
1
vote
1answer
116 views

Why is the Mean Time To Failure of multiple disks calculated via division and not multiplication?

I am reading about disk redudancy. I read the following: Suppose that the mean time to failure of a disk is 100,000 hours. Then the mean time to failure of some disk in an array of 100 disks ...
-1
votes
1answer
65 views

processes response time confusion

An OS contains 10 identical processes that were initiated at the same time.Each process contains 15 identical requests. Each request consume 20 msec of CPU time.A request is followed by an I/O ...