Please enable JavaScript.
Coggle requires JavaScript to display documents.
Lecture 2: Operating System and Process (Von Neumann Architecture…
Lecture 2: Operating System and Process
Von Neumann Architecture
Bus
#
#
Data, instructions, input/output signals
Processor
Arithmetic Logic Unit ALU
Control Unit
Register set
Memory: Storage of instructions / data
Bus with common address & command information coupling CPU and Memory
Operating System
Process
Fork
▶ The initial process becomes the parent,
▶ the new process will be instantiated as child, while
▶ both processes may be continued by the Operating System,
▶ in case the fork command succeeded with a return value or 0.
Create new clone of the ld process, with new PID
LWP: Kernel thread
share: address space, heap, static data, and code segments, and file descriptors*.
Thread
: has its own registers (including program counter), stack pointer, and stack.
#
Scheduling
Dispatcher
:
CPU Affinity
#
is a run time attribute specify at which CPU process is currently running.
Enable binding/unbiding a process/multiprocess to sa specific CPU in a way that processes will run from that specific CPU core only.
=>> Higher CPU utilization
perform necessary set up in order to actually realize the context change... loading process into CPU
Scheduler
:
Quantum or Time slice
Pre-emptive multitasking
: The length of each time slice can be critical to balancing system performance vs process responsiveness
if the time slice is too short then the scheduler will consume too much processing time
but if the time slice is too long, processes will take longer to respond to input.
The scheduler is run once every time-slice to choose the next process to run.
The period of time for which a process is allowed to run in a preemptive multitasking system.
determine and select which process will run next in the ready queue
Context Switch:
Preserve and recall the results of the (computational) state of the previous program :(CPU register, memory allocation) in order to switch from one (running) task to another.