Introduction, Virtulization CPU, memory Flashcards
What happens when a program runs?
It executes instructions.
Describe Von Neumann model of computing
The processor fetches an instruction from memory, decodes it (figures out which instruction this is), and executes it (adding two numbers, check a condition..), then processor moves to then next instruction until program completes.
Why does the OS virtulize resources?
Make the system easier to use
What does it means when the OS virtualize a resource?
The OS takes a physical resource, and transform it into a more general, powerful and easy to use virtual form of itself.
What is OS often refered or known as?
Virtual machine, resource manager, supervisor, master control program, standard library
Standard library to application OS provides
System calls
Resources of the system
CPU, memory, disk
What is it we call virtualizing the CPU?
Turning a single CPU or small set of them into a seemingly infinite number of CPUs and thus allowing many programs to seemingly run at once.
What is a policy of the OS?
Policies are used in many different places within an OS to tell OS what to do, which program should run?
How do modern system vision memory?
Array of bytes
Through which types of instruction do program access its datastructures in memory?
Loads, stores or other explicit instruction that access memory. Instruction is in memory aswell.
Explain what virtualizing of memory means
Each process accesses its own private virtual address space, which the OS maps onto the physical memory of the machine.
Give an example of concurrency problem
When two threads tries to increment a shared variable at the same time the result will be undeterministic because the incremention of the variable isnt happen atomiclly. The loading of the variable value onto a register, incrementing it and storing it. We doesnt have anything that locks this critical section and thus the threads can go between eachother and the resulting value of the variable is unpredictable.
Software in the operating system that manages the disk is called
File system
What is the file systems responsibilities?
It is responsible for storing any files the user creates in a reliable and efficient manner on the disks of the system.