Operating Systems 2014F Lecture 2

From Soma-notes
Revision as of 12:56, 10 September 2014 by Afry (talk | contribs) (Created page with " machine state [br] program counter [br] process states [br] paging / swapping [br] process [br] running program virtualizing time/space sharing mechanisms policy processe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


machine state [br] program counter [br] process states [br] paging / swapping [br]

process [br] running program virtualizing time/space sharing mechanisms policy

processes - key abstraction in an operating system


xwrits link to save your wrists on a *nix machine

program is precise in context of operating systems - web browser is a lot of little programs, but makes up one big program. it is not precise. What is precise is an executable. An executable is a file on disk that can be exec'd. There is a system call - called execve - takes as one of it's parameters a file

code can take many forms in a computer systems.

process - is an executable that has been executed - loaded into memory and start running. An abstraction of a computer that can only run one program at a time. When you wanted to run a program, all of memory would be loaded with that program, when you wanted to quit, you cut the power. They run one program at a time, you load it off the disk, and it has complete control of the machine. A process is the abstraction you get when you say, we don't want every program to have complete control of the program, I want to run different programs concurrently, for multiple reasons. Want to chain multiple programs to produce a result. ( A Unix pipeline) The process - giving each running program it's own virtual computer to run.

Virtualizing / virtualization - really talking about an abstraction - the real thing is not good enough, it doesn't have qualities that you want, you want to transform it into something more useful. When we talk about a virtual machine, a machine that does not exist, is not embodied in actual hardware. All programming languages or programming system, a system is known as turing complete it can run anything. Turning one turing complete system into another turing complete system is called virtualization. Language Based Virtual machine - an example: java virtual machine. Any time you run a higher level language (perl javascript python, etc) That code does not run directly on the processor, it runs inside another program which has some kind of virtual machine. A lot of languages can be interpreted. What they go through is a translation phase, converts it to some binary code, and converts it to byte code. That runtime is what's called a virtual machine. Operating systems can be thought of as implementing a virtual machine. Key difference between a virtual machine that a process is and a language virtual machine.

JVM - executes byte codes. hardware can't interpret byte code

what is the nature of the binary format that is being run in an operating system process - machine code - it's the code that is understood by the processor.