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

learn more… | top users | synonyms

-1
votes
0answers
12 views

'.' is not recognized as an internal or external command [on hold]

def evaluate(str, par): return (os.system("./LKH %s" %par) - swap_2opt_solve_str(str)[1])**2 I have an executable lkh file in the directory. However when my program runs this function, it gives ...
0
votes
0answers
21 views

Confusion about addresses

I am confused. Logical address by definition is the address generated by the CPU. So is it the symbolic address, or is it the relocatable address or is it the absolute address. Also please explain ...
-3
votes
0answers
20 views

What exactly is slow down of effective memory?

Suppose the average memory access time is 250ns, and the average page fault handling time is 200,000ns. If the page fault rate is 15%, what is the slow-down of the effective memory access time? ...
-2
votes
1answer
22 views

Size of address spaces (logical and physical)

Suppose a system in which addresses (physical and logical) occupy 32 bits, page size is 1024 bytes (210), and physical memory is of size 32MB. How many frames are in physical memory? Is the logical ...
0
votes
0answers
21 views

Comparison of Best-Fit, First-Fit and Worst-Fit with SLOB allocator [on hold]

I have been looking the whole internet for the algorithm of worst-fit, but What I found was best-fit and first-fit. Is there any possible chance to get worst-fit algorithm? My Operating System ...
-2
votes
0answers
13 views

Bidding Algorithm - processor allocation - ditributed OS [on hold]

What does the "price" in a bidding algorithm for processor allocation in distributed OS mean?
1
vote
0answers
20 views

Clock variant of the Second-Chance page-replacement Algorithm vs. standard Second-Chance Algorithm

A sample question for my upcoming Operating Systems exam is: Under which circumstances would the clock variant [of the second-chance algorithm] be preferred over the standard second-chance ...
0
votes
0answers
5 views

what exactly is present in CMOS when system is turned on for first time? [migrated]

also how does cmos gets all the hardware information, parameters and stores them? Does Bios writes them into CMOS or some other hardware? Bios has facility to do POST. Is this POST anyhow related to ...
0
votes
1answer
25 views

How does cpu fetch active program data (using virtual address) from storage when there is a page fault?

I read that cpu generates virtual address and using the same mmu translates to physical address and then fetches the data from RAM. But when there is a page fault, the data is fetched from the HDD(or ...
1
vote
1answer
27 views

Second Chance Page Replacement

In the second chance page replacement algorithm, if a page's reference bit is already set to 1, and the next page in line of the reference string is the same page, does the reference bit stay at 1 or ...
0
votes
0answers
8 views

How to find maximum size user-space main memory that can be supported?

I can't figure out how to find maximum size of user space main memory. I have this data: 64-bit computer system that uses pure paging with 16KB page size, if each page table entry is 4 bytes ...
0
votes
0answers
20 views

What are disadvantages of a Operating System that recognise file extensions ?

When Operating system recognise the file types It has several advantages like 1. avoid mistakes like trying to print a object file that produce garbage output but I can't think about disadvantages ...
1
vote
1answer
36 views

synchronization (test-and-set)

I have benn wondering about the following possibility: if I have multiple hardware threads on the same core, and then someone decides to use shared register to allow fast synchronization among threads ...
0
votes
1answer
19 views

Deadlock Solutions: Lock Ordering

This is from a textbook on operating systems. This is not homework, just part of the chapter on deadlocks. ...
2
votes
2answers
61 views

Are device drivers state machines?

I know that device drivers are attached to device controllers, which have their own registers and some local buffer storage. I'm wondering if I can think of device drivers as little state machines -- ...
2
votes
1answer
72 views

What is a student process?

According to Galvin and Silberschatz, 5 queues are maintained in multilevel queue scheduling, each for: System Process Interactive Process Interactive Editing Process Batch process Student ...
3
votes
0answers
20 views

Mutex implementation on top of a preemptive scheduler that does not guarantee liveness

I'm implementing some synchronization primitives in the standard library of an operating system. Specifically, I want to implement mutexes and condition variables. This is on top of a microkernel with ...
4
votes
1answer
79 views

Mutex implementation on top of a minimalistic preemptive scheduler

In this question, I'm implementing some synchronization primitives in the standard library of an operating system. Specifically, I want to implement mutexes and condition variables. This is on top of ...
2
votes
3answers
62 views

What do CPUs do when a program aborts with an error?

If a very severe interrupt occurs, say a divide by zero, this will quit the program. How is this done, is there a special instruction in the processor or is it a software routine? And after quitting ...
0
votes
2answers
55 views

How to implement mutex on single processor (single core) system other than using spinlock

How does one implement mutex on a single processor system without using spinlock mechanism. Mutex is to be implemented in user space (for any user level library like pthread lib for example).
0
votes
2answers
31 views

Why system calls via interrupts are slow and thus we have SYSENTER/SYSEXIT instructions?

As far as I understand we got SYSENTER/SYSEXIT instructions because system calls via interrupts were slow (right? I might be wrong though). Therefore my question is why system calls via interrupts are ...
2
votes
5answers
113 views

How can a CPU access more memory locations than 2^wordsize?

I noticed that CPU's like the 8086 and especially the 8080 have the ability to access more memory than what one would normally assume. The 8080, for example, has an 8-bit word size but can use a ...
0
votes
0answers
14 views

Context switching in M:N threading models?

I wanted to know how M:N kernel user thread model handles context switching, between multiple khread and pthread. How does the PCB/TCB for process and threads look like, how is state of registers ...
0
votes
1answer
39 views

Is Everything a Hardware Interrupt?

Just need a little help understanding hardware interrupts. As I understand (feel free to correct) a hardware interrupts occurs when hardware wants attention of the computer. In basic terms the ...
0
votes
0answers
15 views

What happens when we move/copy a file from one volume to another?

I have been reading about file systems and I/O subsystems, and I feel that the answer to this question will really help me understand the concepts better. One thing that I have noticed is that unless ...
0
votes
1answer
27 views

Can this question be solved without knowing the Page Table Entry?

I'm preparing for the exams and this question came up - Consider a machine with $64MB$ physical memory and a $32$-bit virtual address space. If the page size is $4KB$, what is the approximate size ...
1
vote
1answer
30 views

Is Starvation Possible in LOOK Algorithm

The LOOK algorithm (wiki) is the same as the SCAN algorithm in that it also honors requests on both sweep direction of the disk head, however, this algorithm "Looks" ahead to see if there are any ...
2
votes
1answer
25 views

How is the directory implementation done using a linear list?

I am reading Operating System Concepts by Silberchatz, Galvin, Gagne and they write that a directory can be implemented using a linear list. [pg 470, 8th ed] However, I visualize directories as a ...
1
vote
1answer
27 views

How to interprocess communication and scheduling algorithms interact?

I was listening back to a lecture I had, hinting on what we should revise for our upcoming exam. Since then I've covered all the parts, but having difficult in decrypting the following You might ...
0
votes
0answers
38 views

Solution to Infinite-Buffer Producer/Consumer Problem Using Binary Semaphores

Was reading semaphores from Stallings' Operating Systems book. semWait and semSignal for binary semaphore is given as follows: ...
2
votes
1answer
62 views

When should you disable all interrupts in a program?

Consider a machine that has nested interrupts (a higher priority interrupt can interrupt a lower priority one, the current instruction's address is saved and later restored). Why would a programmer ...
-2
votes
2answers
48 views

Books about old Operating systems [closed]

where can i find very old books about old operating systems like CP/M and DOS and other OS that worked on the 8086 ?? second question isn't old books 20 year before and older should have an expired ...
-3
votes
1answer
55 views

Can we build an operating system that can be infected by any virus?

Is it theoretically feasible to engineer a computer (more specifically its operating system) that is simple and primitive enough to be infected with any type of virus? That is, this would be a ...
2
votes
1answer
80 views

Can Shortest Job First Scheduling be subject to convoy effect?

Look at the below table for example : Look at the Non-Preemptive SJF table Suppose if the burst time of process $P_1$ was a very large number compared to $7$, the processes $P_3,P_2$ and $P_4$ have ...
0
votes
1answer
46 views

Maximum I/O Data Transfer if DMA is used

I was reading lecture notes of Universiti Malaysia Perlis when I am came across following question: A computer consists of a CPU and an I/O device $D$ connected to main memory $M$ via a shared ...
8
votes
3answers
168 views

Why is the CPU Involved During Keyboard Echo?

I'm currently studying for a computer science exam, and I've come across a concept that has me somewhat stumped. When one types a key on the keyboard, an ASCII character is transmitted to the CPU. ...
3
votes
2answers
86 views

Overlap between theory and systems fields in CS

I have finally had some serious graduate-level exposure to CS Theory and loved it. I really enjoyed complexity theory (time and space complexity, the different classes, reductions to prove ...
0
votes
0answers
38 views

Switching between user-level and kernel-level threads

After reading difference between user-level threads and kernel-level threads ,now I am in doubt of context switching.Context switching is managed by OS when switching between processes/threads but ...
3
votes
0answers
38 views

What type of operations are seen the most at the physical disk level — reads or writes? Why?

This question came up in my operating systems class in a section about file system cache and RAID. I'm speculating that the answer is that writes are seen more at the physical disk level because an ...
0
votes
1answer
114 views

What is the overhead of Virtual Memory?

What is the price paid for the vast virtual address space provided to programmers for their applications? Or in other words, what is the overhead due to virtual memory? Is there any other overhead ...
0
votes
2answers
58 views

Understanding transactions

In operating systems, Is a transaction a process? Are they the same concept? Does a transaction have the same meaning in database management systems, as in OS? A database book says A ...
-1
votes
1answer
117 views

SCAN and CSCAN algorithms of disk scheduling

I am having hard time understanding the working of SCAN and CSCAN algorithm of disk scheduling.I understood FCFS,Closest Cylinder Next but heard that SCAN resembles elevator mechanism and got ...
1
vote
1answer
269 views

Does Second chance Page replacement algorithm suffer with Belady's anomaly?

In Second chance Page replacement algorithm(clock algorithm), if all the Reference bits are set to one, then the algorithm behaves just as FIFO. Considering this case, can we conclude that Second ...
0
votes
0answers
13 views

Location of process in new state

A process has 5 states as shown below . New,Ready,Running,Waiting,Terminated. If a process is in new state. Then my doubt is "where the process is present ?" Is it present in main memory or ...
0
votes
0answers
42 views

Solve a basic mutex lock problem while preventing deadlock

I am solving a problem with a bridge, where you have a one way bridge with people coming from each side. To solve this problem while preventing deadlock (two people going opposite directions on the ...
0
votes
0answers
37 views

Operating Systems Qualifying Exam Visual Study Aids

I have read the Operating System Concepts book, watched a lot of videos on YouTube, practiced with past qualifying exam questions and several exams from other CS departments around the world. ...
0
votes
2answers
110 views

Operating System Paging concept

I am quoting a paragraph from the book "Operating System Principles" by Galvin. Usually, each page-table entry is 4 bytes long, but that size can vary as well. A 32-bit entry can point to one of ...
0
votes
2answers
74 views

How CPU know which process generated an interrupt?

When a computer OS supports multi-program, it needs to have a scheduling algorithm to handle which process will be run by the cpu. If a process is in state 'blocked' waiting for IO, the scheduling ...
0
votes
1answer
66 views

Round-Robin Scheduler - What exactly is the quantum time used for?

Suppose you have three stages for a job: Creation stage = the job gets created Executing stage = the job is executed/served Finishing stage = the job is "marked" as finished. Now, say the quantum ...
-1
votes
1answer
196 views

Calculating disk seek times

I have a system where disk requests come to a disk drive for cylinders in the order 10, 22, 20, 2, 40, and 38 at a time when the disk drive is reading from cylinder 20. The seek time is 6ms per ...