lecture number 2 Flashcards
OS play role as resource manager
what is resource manager?
resource manager can be define as a component of OS which keep track of avalable software or HW for a system or project.
cpu?
the processor that perfome multiple computation
main memory
it stores all data which is used by cpu it is near to cpu
sytem bus
cumminacation between I/O,memory ,cpu and HW
cpu perform basisc three operation name and define
they are
1)fatch: retrive data from main memory address whos value is in PC
2)decode: decode or intrupt the fatched instruction
3)exction: excute it
mechine language
set of instruction by which cpu can talk with HW directly
it is set of binary number
instruction is sequance of bits
smallest bit is 1 bit i.e 1 or 0
word is 32 to 63 bit
instruction set of mechine languge
instruction of mechone languge
two parts
oprand = cpu register or main memory address
operator = opcode
cpu register define and two type
small chip reghister size is one cpu word
genral purpose reggister are : eax,ebx
speacial purpose : esp(stack piotern),ebp(base pionter),eip
mian memory desing and working
consist of cels each cel is made of 8 bit i.e 1 byte or multiple of it i/e 32 bit which is 4 byte
I/O and cpu refer cell address to read and write from main mem
system bus define and part
one bus control every thing
3 parts
1)data bus : carry infromation
2)address bus : decide where to put
3) control bus : which operation to use
I/O device parts and device controler define
two parts
1)device itself
2)divece controller: chip or chips that control physical deivece i.e part1
how OS or cpu write or read from I/O
they read by device controll driver which help to connect device controller and OS
deivce controller have different registers
1)status reg: tell to cpu the current status of IO
2)constroll reg : used by cpu to control IO
3)data reg : read data or write to IO
Por t- vs. Memor y-Mapped I/O
port mapped : acccess controll register using different io address space
mapped io : access controll register using same main memory address space
performing i/o task steps
polling : cpu check for status
itrupet driven : cpu get intruptfrom deice controller either it is succefull or not
programmed io : cpu works on io data
DMA : direct memory acces : here the data is attached and retrive from io deivece directly to cpu
privelged instruction and who can excute it
those instrunction which are harmful or sensitive and must be kept away from users
e.g is HLT : which stop or halt the system
INT X: which intrupt operation x
it can be exuted onlly by OS i.e in kernal mode