lecture number 2 Flashcards

1
Q

OS play role as resource manager
what is resource manager?

A

resource manager can be define as a component of OS which keep track of avalable software or HW for a system or project.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

cpu?

A

the processor that perfome multiple computation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

main memory

A

it stores all data which is used by cpu it is near to cpu

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

sytem bus

A

cumminacation between I/O,memory ,cpu and HW

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

cpu perform basisc three operation name and define

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

mechine language

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

instruction set of mechine languge

A

instruction of mechone languge
two parts
oprand = cpu register or main memory address
operator = opcode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

cpu register define and two type

A

small chip reghister size is one cpu word
genral purpose reggister are : eax,ebx
speacial purpose : esp(stack piotern),ebp(base pionter),eip

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

mian memory desing and working

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

system bus define and part

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

I/O device parts and device controler define

A

two parts
1)device itself
2)divece controller: chip or chips that control physical deivece i.e part1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how OS or cpu write or read from I/O

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Por t- vs. Memor y-Mapped I/O

A

port mapped : acccess controll register using different io address space
mapped io : access controll register using same main memory address space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

performing i/o task steps

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

privelged instruction and who can excute it

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

two user mood in cpu instruction and thier def are ?

A

kernal mode : it is unrestrid mode it has done by OS and in then mode os can do anything
user mode @ it is restricted here we can not do follwing thing
we can not access address of io
we can not perform senstive instruction like HLT etc
we can not change the content of main memory
can not swtich to kernal mode

17
Q

how cpu knwo we are in which mode

A

it given by HW and it has one bit i.e 0 = kernal and 1 = user

18
Q

how HW give mem protection ?

A

by two registers
base register @ it give the intial address
limit reg @ it give the final limit address register
so once the user porg start the os takes these two regster
and our cpu check for theese two reg refrence once the refernce is reached to limit reg so the job is finsh that is prog is end

19
Q

exception and interupt diff

A

exception is SW gernted like deived by zero
intrupt is HW genrated

20
Q

TRAP @ meaning, usage types

A

when we change from user to OS kernal mood so called TRAP
done by three ways
1) system calls : when the prog is runnung and we want to wite in a file in dicks so kernal moode on
2) exception call : in user mood when exceotion accour so kernal mood call to handle it
3) in user mood when intrupt accour by HW so again kernal needed to handle

21
Q

user interface (user prog os interface)

A

it is between user prog and os but above the system calls it gve us follwing work
os procedure to excute senstive innstruction
it is written in highly level lag
it can be acces by high level langue application prog interface API rather than system calls

22
Q

5 main catog of sys call ?

A

1) process controll
2) file manag
3) divce manag
4) info mantaince
5)communaction

23
Q

process controll in sys call

A

it has end, abor t, load, execute, c r e a t e process, t e r m i n a t e process etc
when one stope so other must starts

24
Q

file managment in sys call

A

in has create file, delete file, open, close, read, write etc
supported on directries and ordinary files

25
Q

deivice manag in sys call

A

Include request device, r e l e a s e device, read, write, reposition etc

26
Q

information maintaince in sys call

A

Include calls to get/set the time, date, system data, and process, fi l e , o r
device attributes

27
Q

communaction in sys call

A

Include create/delete communication connection, send/receive messages,

28
Q

communaction have two phase
1) massage pass
2) shared mem
discuse both breifly

A

1) messgae passing:
here the communatioction must gove support to sys call to idetify a process with whom we message
wait for incoming message
establish a connection bet two process
2) shared mem must give support to call
to access or creat mem that will be shared by process including threads
provide lock
provide shared mem or free up it

29
Q

three methods to pass paramters in os is ?

A

1) put paramter inside the register but we may have more para than availble reg
2) put para in mem so the address of mem works as param
3) push into stak and popped up by os