Page 65 - DCAP103_Principle of operating system
P. 65

Principles of Operating Systems



                   Notes         Message-Passing System: Message passing in computer science is a form of communication
                                 used in parallel computing, object-oriented programming, and interprocess communication.
                                 Process Control Block (PCB): The PCB is a certain store that allows the operating systems to
                                 locate key information about a process.
                                 Process  Counter:  Program  instructions  uniquely  identified  by  their  program  counters  (PCs)
                                 provide a convenient and accurate means of recording the context of program execution and
                                 PC-based prediction techniques have been widely used for performance optimizations at the
                                 architectural level.
                                 Process Management:  The operating system manages many kinds of activities ranging from
                                 user programs to system programs like printer spooler, name servers, file server, etc. Each of
                                 these activities is encapsulated in a process.

                                 Process Scheduling:  The problem of determining when processors should be assigned and to
                                 which processes is called processor scheduling or CPU scheduling.

                                 Process State: The process state consist of everything necessary to resume the process execution
                                 if it is somehow put aside temporarily.

                                 Synchronization: In computer science, especially parallel computing, synchronization means
                                 the coordination of simultaneous threads or processes to complete a task in order to get correct
                                 runtime order and avoid unexpected race conditions.
                                 Thread: A thread is a single sequence stream within in a process. Because threads have some
                                 of the properties of processes, they are sometimes called lightweight processes. In a process,
                                 threads allow multiple executions of streams.
                                 2.8 Review Questions


                                    1.  What is a process?
                                    2.  What about process states?

                                    3.  What is a process control block?
                                    4.  How do processes inter-communicate?

                                    5.  How do processes synchronize their activity?
                                    6.  How do processes protect critical data (Critical sections)?
                                    7.  Consider the interprocess-communication scheme where mailboxes are used:

                                       (  a)   Suppose a process P wants to wait for two messages, one from mailbox A and one
                                          from mailbox B. What sequence of send and receive should it execute?

                                       (  b)  What  sequence  of  send  and  receive  should  P  execute if  P  wants to wait for one
                                          message from mailbox A or from mailbox B (or from both)?

                                    8.  What  are  the  benefits  and  the  detriments  of  each  of  the  following?  Consider  both  the
                                      systems and the programmers’ levels.

                                      (a)  Direct and indirect communication
                                      (b)  Symmetric and asymmetric communication
                                      (c)  Automatic and explicit buffering





        58                                LOVELY PROFESSIONAL UNIVERSITY
   60   61   62   63   64   65   66   67   68   69   70