s Multiple instances. s Each process must a priori claim maximum use. s When a process requests a resource it may have to wait.
s When a process gets all its resources it must return them
in a finite amount of time.
Data Structures for t
I nstr uction set Summar y
I nstr ucti on F or mats Oper ations Addr essing M odes Pr ogr ammer s Register s
C ON T ROL L OGI C U N I T
-D ir ects all har dw ar e activi ty inside -Contr ols F etch, D ecode, Execute Cycle
M acr o/M icr o I nstr uctions
InstructionDecoder IR PC Address Bus DataBus MAR CPUBus B MDR R0
Rn1 ClearY ControlLines A Y ALU Z
Step T1 RTL MARPC; PC PC+1 Control Sequence PCout, MARin, Clear Y, Set Carryin of ALU, ADD, Zin, READ
What is an Operating System?
A program that acts as an intermediary between a user of a computer and the computer hardware. Operating system goals:
Execute user programs and make solving user problems easier. Make the computer system c
Main memory only large storage media that the CPU can access directly Secondary storage extension of main memory that provides large nonvolatile storage capacity Magnetic disks rigid metal or glass platters covered with magnetic recordi
Basic Concepts Scheduling Criteria Scheduling Algorithms
Maximum CPU utilization obtained with multiprogramming CPUI/O Burst Cycle Process execution consists of a cycle of CPU execution and I/ O wait CPU burst distribution
A priority number (integer) is associated with each process The CPU is allocated to the process with the highest priority (smallest integer highest priority)
SJF is a priority scheduling where priority is th
Critical section for n processes
Before entering its critical section, process receives a number. Holder of the smallest number enters the critical section. If processes Pi and Pj receive the same number, if i < j, then Pi is served firs
s Define a semaphore as a record
typedef struct cfw_ int value; struct process *L; semaphore;
s Assume two simple operations:
block suspends the process that invokes it. wakeup(P) resumes the execution of a blocked process P.
Deadlock can arise if four conditions hold simultaneously.
s Mutual exclusion: only one process at a time can use a
resource. s Hold and wait: a process holding at least one resource is waiting to acquire additional resources hel
Microprocessor (ComputerscentralProcessingUnit) Ex:Pentium,68000etc. hastwoparts Controlpartsayswhattodo Datapartdoesit
Steps in Execution of an Instruction
CPU fetches instruction from Main Memory CPU Decodes the Instruction Op-code Depending on Op-code