Friday, November 26, 2010

Operating System Concepts4.

M.C.A  -  Operating  System Short Questions. – G.VeeraRaghavaiah
 
97.     System call Interrupt Handler:- It consists most of the functionality of OS. When it calles by OS, when a process executes a system call instruction , because we initialized that interrupt vector with the address of the system call interrupt handler.

98.     OS’ s are not active but rather are possive entities. They do not do things on their  own, but instead respond to events. These are some times called reactive systems. They react to interrupt.

99.     Process Table:- Process table is a central data structure used to implement processes. It contains an entry called a process.

100.  Read List:- Another process management data structure is ready list. This is a list of processes that are currently ready to use the processor and  so are processes for dispatching.

101.  Mono Programming:- Just run one program at a time, i.e., process runs to completion and then another program is run. Ie called mono programming.

102.  Through Put:- getting the most processor run in a given amount of time.

103.  Batch OS:- A batch OS could use two computers.  1. A small, low, cheap computer to read cards onto tape and print them on tape, we use fast computer. The jobs on single tape were called a batch.

Chapter:- 6

104.  Race Condition:- A race condition is a situation where the relative timing of the events in the separate processes could affect their output.

105.  Automatic Action:- An automatic action is one where no intermediate state can be seen by any other process. Write-write not allow. Exchange word: read then write son two processor system.

106.  Busy Waiting :- By ealiminate the race condition we implement automatic action with exchange word instruction. This means that the processor is executing in a loop while it is waiting to use the process table we call this busy waiting because the processor is busy  executing instructions while it is waiting.

107.  Spin Lock:- It is a lock because it protects a shared variable. It is a spin lock because busy waiting is roughly analogous to spinning . we can think of exchange word instruction spinning variables between the register an the lock variable.

108.  Threads:- Threads are light weight processes that can share an address charactestics of a process, but it is possible to have several threads is possible to have several threads sharing the same memory  space.

109.  Light weight Process:- Another name used for thread is light weight process that can share an address space.

110.  Server Process:-  Another natural use of threads is server process. A server process is one that receives request from many other processes. A server will often have several requests at once, and it does want to server only one request at a time.

111.  User Threads:-  A user process does not need to be in system mode to be this . this techniques is called user threads. User threads are much moirĂ© efficient  than light weight processes be cause they do not require a switch to OS to change threads. User threads are more efficient and kernal threads are more flexible.

112.  Kernal  Threads:-  The concept and that is to implement threads inside the operating system. This is called kernal threads. Another word for OS is kernal and so kernal mode processes are also called kernal threads.

113.  Kernal :-  It is a part of OS that implement the most  basic functions of the system. The kernal always runs in system mode and  the core of the3 operating as system. We use the term kernal in kernal mode processes we indicate that this is a process that is running  in system mode.

114.  Multi Processing:-  It6  switches two or more processors among several more programs kept in a common memory at the same time. It refers a situation where there is more than one processor in the system.

115.  Shared Memory Multiprocessors:-  The processors share memory, and these are often called shared memory multiprocessors to emphasis this fact. It is easy for processors in such a system to communicate, because they share a memory and they can communicate using the memory.

116.  Multi programming:- Multi programming switches two or more processors among several programs kept in a common memory at the same time. It is a situation where more than one program in memory at the same time,  sharing the processor and appearing to be running in parcel .









96.  Disk driver sub system:-  Creates disk abstraction for the user process. It communicates with the disk hardware and handles the disk interrupts. It also includes device driver sub system that accepts the disk operation requests and schedules then on to the disk.

Operating System Concepts3.

M.C.A  -  Operating  System Short Questions. – G.VeeraRaghavaiah

91.Int Send message(Int Msg- Void, Int x Mesg):- The integer pointer Msg points to an array of 8 integers , Which is the message Msg void is the identifier of message queue. The message is to be set to a return code  of –1 means that the message – Queue – id was not a valid  message  Queue identifier. A return code of –2 means that they were no available message  buffer. In both of these cases the message were not sent.

92.Int Receive Messge(Int Msg-void –id, Int x Msg):- This system calls returns oldest message in the message queue with identifier Msg-Queue-id. If there are no message in the queue the system caller is blocked until a message is sent to the queue. The Msg argument is the addresses of an 8 word array where the message will be placed. A return code of –1 means that the Msg –queue-id was not valid message queue identifier and no message was created.

 

 

 

 

 

 

Disc I/O / Related System Calls


93. Int read disc back(Int block number, char, * buffer):- Disc block block number is read into buffer. The system call always succeeds and returns 0.

94. Int  write  disk block (int block number, char * buffer):- Disk block block number is read into buffer. It always succeeds & returns zero.
95.  Process Management Sub System :-   creates the process abstraction. It maintains process tables and message queues, handles system calls and  dispatches process to run on processor.

96.  Disk driver sub system:-  Creates disk abstraction for the user process. It communicates with the disk hardware and handles the disk interrupts. It also includes device driver sub system that accepts the disk operation requests and schedules then on to the disk.

97.     OS objects are represented in OS by data structures and implemented with procedures that operate on those  data structures.   

98.      Process States:- 1.  Running    2. Ready to run    3. Blocked

99.     Process Dispatcher :- It finds a ready process and starts it running.

100.  Preemptive Scheduling :- Scheduling is selecting the job and allocating it to the processor. In preemptive scheduling we will not allow a process as long as it likes, but allocates as block of time to it. This block of time is called time slice or quantum.

101.  System Stack :-  timer Interrupt Handler:-  It is called when a timer interrupt occurs. A timer interrupt indicates that the time slice has run out, so the current process has used up its allocation of time now.

102.  Timer Interrupt Handler:-  It is called when a timer interrupt occurs. A timer interrupt indicates that the time slice has run out, so the current process has used up its allocation of time now.

103.  Content Switch :- The saving of content of one process and restoring  of content of another process switches the current process and so is called content switch.

104.  Context half context switch:- First thing of interrupt hander is save the content of current process is half context switch.

105.  Initial Process:- OS causes which creates initially. We assume that there is an initial process that is located at fixed location on disk.

Operating System Concepts2.

M.C.A  -  Operating  System Short Questions.  G.VeeraRaghavaiah
51.Address Space:- Operating system creates multiple address spaces (memory for processor to run in ) out of the memory and allocates them to processes. It accomplishes the space multiplexing the processor.

  1. File System:- By implementing the file system and I/O system so that processes can easily use and share the disks. It accomplishes this by space multiplexing the disks and the time multiplexing I/O channels.

53.H/W Interface:- This H/W interface consists of things like program counter, registers , interrupts ,disks, terminals. H/W interface consists of everything . You need to know about the H/W in order to write programs  that will execute on the H/W.

54.H/W Resource:- Operating system manages the resource of the computer system  are
                              Processor, Memory, I/O controllers, Disk Devices and other Devices.

55.Mechanism:- A Mechanism is a set of basic facilities that can be used in different ways. Ex :PL is a mechanism to write the programs.

56.OS  Interface:- OS shares the characteristics of the H/W and S/W. An OS is a software that is it is a  program that is compiled , linked, and run on a computer .

57. Policy:- A Policy is a mechanism for particular purpose. Ex: Program to solve the specific Equation.

58. Process:- OS creates several  processes out the single processor and allocates them to programs. It accomplishes by time multiplexing the processor.

59.Resource Management:-  As a resource manager  OS performs the operations.
                                                          1)Transforming
                                                          2)Multiplexing
                                                          3)Scheduling
60. Space Division Multiplexing:- A resource is divided in to smaller versions  of itself and each virtual computer is given a part of the resource.

61.Space Sharing:- Space division multiplexing is used in Multiplexing primary and secondary storage (memory & discs)  is called Space Sharing.

62. Spooling:- Simultaneous peripheral operations online. Two or more  virtual computers can issue printer operations.

63.System Call:-  In process execution .In return for the instructions that allow the virtual processor to request virtual resources from  the OS. These instructions are called system calls. System calls allow a programmer to 1) Create new virtual computers, 2) Communicates with other virtual computers 3) Allocates the memory as needed  4) Do some I/O 5) Access a sophisticated file system.

64.Time Division Multiplexing:- Here the resource is used for different virtual computers at different times.

65.Time Sharing:- In  many of the contexts time division multiplexing is called Time sharing i.e., allocates processor time to the jobs that are writing in priority Queue on the basis of time sharing manner.

66.Transformation:- OS transform physical resources into virtual resources to avoid the difficulties associated with using H/W resources.

67.Virtual Computer :- OS creates what we will call  virtual computers from the physical  computers. The first thing is we need to look at how virtual computer differs from actual physical computers. The most significant difference is that there are more virtual computers only one physical computer.

68.Virtual Resources:- A virtual resource provides the essential functionality of the H/W resources, But is easily to use the cause details of H/W interface are hidden .

69.ASM Block:-  A Block of memory that can be allotted permanently to some group of instructions. These instructions memory addresses cannot change in RAM. In C++ compiler you use ASM Block of executing  instructions.

70. Base Register:-  The memory base register is added to all addresses when the system is in user  mode.

71. Bound  Register :- The memory bound register is the addresses limit . In user mode all addresses  must be less than the boundary register. Otherwise a program error interrupt will occur. The comparison is done before the base register is added.
72. Control Register:- Hole values that control the execution of the processor. The control registers are all 32-bits long.

73.C.P.U:- The CPU provides 32 general purpose registers are referenced  using the names R0 through R31 as is common  with RISC machines.

74.General Purpose Registers:- CPU provides 32 general purpose registers each 32-bits long. These are the registers R0 to R31.

                         R0=Always 0 value.
                         R1=Procedure returns
                         R31=Procedure returns addresses
                         R8, R9, R10, R11=System calls
                         R29=Frame pointer
                         R30=Stack pointer

75.I/O Addresses Space:- The I/O addresses space is part of actual memory at addresses 0 to on FFFFFF. The I/O addresses space is a part of physical addresses space reserved for I/O devices and consist of the physical addresses on F0000000 to on FFFFFFFF.

76.Interrupt:- An Interrupt is an immediately transfer of control caused by an event in the system.

77.Interrupt Vector Area:- When an Interrupt will occur the processor then saves the  ia register in the iia register, gets the addresses of the interrupt handler by locking in  the appropriate slot  in the interrupt vector area.

78. Logical addresses :- Processor is in user mode.

79.Physical Address:- Processor is in  system mode.

80.Logical Addresses space:- Processor is in user mode all the addresses are generated by a program.

81.Physical Addresses Space:-   Processor is in the system mode, all the addresses are generated by a program.
82. Masked :- Some interrupts can only occur if bit-1 of PSW register is 1. If it is 0 the interrupts are masked.

83.Memory Addresses space:-  The memory addresses space is a part of the physical addresses  space where we can place the physical memory.

84. Memory Mapped I/O:- Meaning that communication between I/O devices and the processor is done through physical memory locations, in the I/O addresses space.

85.Processor:- CPU processor consists of 32-bit general purpose registers for processed the program instructions and data.

86.User Mode:- If the system is in the user mode PSW bit-0 is set to 1. In system mode PSW bit-0 is set to 0.

87.System Mode:- If the system is in the system mode PSW  bit-0 is set to 0. If the system is in system mode we cannot interact with OS. If the system is we can interact with OS.

88. Int Create Process(Int block number, Int no. of blocks):- Create a new processor and returns process id . The processor code and data are  on disc in  a “No. of blocks in consequent order starting with disc block block number. –1 returns process was not created there were no process descriptor in process table.

89.Void Exit Process(Int Exit Code):- The calling  process was terminated and its resources are returned to OS. This system call always succeeds.

90.Int Create Message Queue(Void):- A new message queue is created and is its identifiers is return. A return code of –1 means that the message queue table was fill and the message queue was not created.

Operating System Concepts1.

M.C.A  -  Operating  System Short Questions. – G.VeeraRaghavaiah

1.     Buffering:-  In IPC one process send messages to the other process. Sending process is called “Sender”, receiving process is called “Receiver”. If the  receiver is not  yet to ready to receive the message that  message is temporarily stored in “Buffer “ i.e., known as buffering. Such a messages that are waiting is buffer is known as the “Message Queue”.

2.     Child  Process:- In multi user ‘OS’ , if  one process  creates other  process created  process  is  called  Child  Process.

3.     Parent process:- In multi user ‘OS’ . if one process creates other process creator is called “Parent  Process”.

4.     Component Name:- In Unix if want to refer any directory, we can search entire tree structure from “root” on words.
For Ex:-       / bin                                  /
                    /user/bin
                                                          user  bin
                                                           
                                                        bin
We have to specify full path names each part of the full path name will be treated as “Component” each component name is locked in the directory.

5.     Device Independent:-  in Unix & copy / dev / hyt file towrite
Here we take input from the terminal and with it inot the file file to write. Here the program does not need to know whether it is  reading from ( or writing) to a file or device, i.e., called device independence.

6.     Directory:-  A directory is a collection of names each of which referencing to a file or another directory. If a name leads another directory then it is a collection of names.

7.     Exec v:-  int excev(char * programname, char * arg[]); 
Here the program  programname   is run in the calling process. The program in the calling  process is over written and will no longer exist. The arguments are in the argument vector argv which is an array of strings that is an array which is an array of pointers to characters.

8.     Fork:- int fork(void);  A new process is created that is an exact copy of the process making the system call.

9.     FIFO:-  We can use some idea about inter process communication through a technique is called named pipes(called fifo) when we read from pipe, we can get source bites.

10. File:- A file is a collection of data and information.
11. Open file:- Opening a file creat an operating system object called an open file. The open file is logically connected to the file you named in the  open system call.

12. File Location:-  An open file has a file location associated with it . it is the offset in the file where the next read or with will start.

13. Flat name space:- If the root directory could contain only file names and not dir4ctly names is called a flat name space.

14. Two level name space:-  A two level name space is a hierarchy that is limited only two levels, so only the root directory contain other directories.

15. Hierarchical file naming system of name lookup:-  In UNIX hierarchical structure each directory is a collection of names, and all the names in a directory are unique. A directory for forms a name  space and a  directory also include the mapping from each name or directory it  refers  to.  So gives  a  name  and  directory,  you  can find the name (or) a directory the name  refers to this called “name look up”.


16. Filter:-  A program whose main function is to read a sequence of bits from its standard input and trans form the stream in some way, and then write to the standard output is called “Filter”.

17. Inter process communication:- Using process system calls we can send arguments to a new process to communicate with each other while they are running. We can this “IPC”.

18. Meta  information:- Information about information.

19. Micro kernal:-  New OS – in mid 1980’s at Carnegie – Mellon University. Functionally provided by the process running out side the kernel.

20. Open file:- In order to use a file you first need to ask for it by name. This is called opening the file opening, a file creates an OS object “Open File”.

21. Open file Identifier:- The named file is opened, and an identifier, the open file identifier is return. This a file location is initialized to ‘O’. the flags argument is one of:-
                 O   :   Open for reading
1       :   Open for writing
2       :   Open for reading & writing
22. Program:-  A program is a static object that can exist in a file it contains the instruction.

23. Process:-  A process is a dynamic object that is a program in execution. A process is a sequence of instructions to execute.

24. Process Hierarchical:-   If one process creates another process, creator of the process is called parent process. The parent child relationship can be shown in hierarchical representation is known as process hierarchical.

25. System call interface:- It is the description of the set of system calls that are implemented by the operating system.

26. Shell:-  A shell is a command language interpreter it decides which will be executed by the processor next from the waiting queue.

27. Standard Input

28. Standard Output:- Open files are named with integers are called open file identifier. In Unix open file identifier is set to ‘o’ is called standard input. Open file identifier is set to 1 is called standard  output.

29. Redirection:-  When shell starts the program standard input and standard output are normally from the user terminal, but they can be changed by a method is called redirection.

30. Macintosh “OS” :- It brings significant challenge to the domination if the IBM PC computer market for Apple Macintosh Computer. It provides full fledged graphical interface and significantly easier to use.

31. Connection Protocol:- Communicating with server by establishing a connection with the server .  Ex:-  telephone system.

32. Connectionless Protocol:- In connectionless  protocol there is no interaction with the server.   Ex:- postal system.

33. Message Passing:- Messages are connectionless protocol. Each messages standards on its own and is not connected with other messages.

34. Pipe:-  A pipe is a connection protocol for communication between processes.

35. Decomposition Pattern:-  for decomposing  a system, we  can decompose into
·       A Strict hierarchy of  procedures
·       A DAG of procedures.
·       A Sequence of levels where each level is a module.
·       A collection of methods that export and import interfaces from other modules.
36. Directed Acyclic  Graph(DAG):-         If we consider any tree structure none of the nod having two parents. If no procedure could be called by two other procedures  to the designers of these generalized the structure  a little to also a node to have to parents, but still no cyclic were allowed this is called a Directed Acyclic Graph (or) DAG.

37. Design Problem:- During the program design you, repeatedly come across situations where you need to achieve a certain goal in a certain situation  subject to certain constraints . this is what we call a design problem.

38.  Design Skill:- This consists of being able to move around  into  design space and find good points. This includes skills in a evaluating designs.

39. Design Space:- One way to look at design is as a search thorough the design space of the problem.

40. Embedded system:-  These are all micro chip based systems. Many of these are data reliant and could  therefore be the source of problems and different levels. A resolution plan is offered. The current languages are embeddable. This means that they are implemented as procedure library  that can be included in any program.

41. Implementation:- In level  struct5ure each level has an interface which is used by the next level up. Each  interface is supported by the implementation below the interface.

42. Interface:-  An interface is a specification of the capabilities of  a level. An interface is a contract between the implement of the interface and the clients of the interface.

43. Interface  Design :- Range of possibilities in the design of an interface is called interface design.

44. Language interface:-  In language interface where the upper level might be  a user or a program that sends a lower level a program to execute.

45. Little Languages:-  In software design technique two level structure are used called little languages. The idea of little languages is that it provide interactive access to a collection of functions related to a task.

46. scripting Languages:-  Little languages can bring some power of programmability to the user level. Scripting languages like shell programming languages. Little language idea is so useful that there re many examples in commercial and non commercial products.

47. Modularity:-  is key principle. In software design is modularity.
48. let of modules to get the advantage of modularity.  Two level implementation : modularity plays major roles in ‘OS’ design. Here two level implementation plays major role. Here there are just two levels. Upper level is running on lower level module. 

49. Policy & Mechanism:- In two level implementation often the lower level implements the policy.
Upper level : Program
                         Lower level : Language

49.Connection Protocol:- Static Telephone system.

50. Connectionless  Protocol:-  Dynamic postal system.