SlideShare a Scribd company logo
1 of 5
CSE-316 (OPERATING SYSTEM)
                      HOMEWORK 1




Submitted by-
Tej prakash

RM2801A20

10803816




Part A
1. In a multiprogramming and time sharing environment, several
           users share the system simultaneously. This situation can result
           in various security problems.
        a) What are two such problems?

         Ans-     a. St e a l i n g or co p y i n g on e’ s pr o g r a m s or da t a ; us i n g sy s -
te m re s o u r c e s
             ( CP U , m e m o r y , di s k sp a c e , pe r i p h e r a l s ) wi t h o u t pr o p e r ac -
coun t i n g ..


        b)   Can we ensure the same degree of security in a time shared machine as
             in a dedicated machine? Explain your answer.
                . Pr o b a b l y no t , si n c e an y pr o t e c t i o n sc h e m e de v i s e d by
             hu m a n sc a n in e v i t a b l y be br o k e n by a hu m a n , an d th e mo r e
             c o m p l e x th e sc h e m e , th e mo r e di f f i c u l t it is to fe e l
             c o n f i d e n t of it s co r r e c t im p l e m e n t a t i o n .




        2. Under what circumstances would a user be better off using a
           time sharing system rather than a PC or single user
           workstation?
        Ans- When there are few other users, the task is large, and the hardware is fast, time-sharing
        makes sense. The full power of the system can be brought to bear on the user’s problem. The
        problem can be solved faster than on a personal computer. Another case occurs when lots of other
        users need resources at the same time. A personal computer is best when the job is small enough
        to be executed reasonably on it and when performance is sufficient to execute the program to the
        user’s satisfaction
3. In the designing of the operating system there are two
   approaches modular kernel and layered approach? How are
   they different?
  The modularkernelapproach requiressubsystems to inter                     -
  actwitheach otherthrough careful y
                                  l constructedinter            -
  faces thatare typica l narrow (in terms of the funct
                      ly                              ion               -
  ali thatisexposed to externalmodules). The layered ker
     ty                                                                         -
  nelapproach issimi r thatrespect. However, the lay
                    la in                                           -
  ered kernelimposes a str t
                          ic orderingof subsystems such
  thatsubsystems at the lowerlayersare not allowed to in                    -
  voke operationscorresponding to the upper-layersubsys         -
  tems. There are no such restr c i inthe modular- ernel
                               i t ons           k
  approach, whereinmodules are freeto invoke each other
  withoutany constra ts.
                    in




                              Part B


4. There is guest operating system and a host operating system
   like VMware? List all the factors in choosing the host operating
   system?
  Ans- Guest operatingsystem provides i serviceby
                                       ts
  mapping them intothe functional t provided by the host
                                 iy
  operatingsystem.a key issue thatneeds to be considered in
  choosing the hostoperatingsystem iswhetheritis
  suff c en l generalinterms of system cal inter
      ii ty                               l     facein
  orderto be able to supportthe functional t associated
                                          iy
  withthe guestoperatingsystem.




5- The kernel is responsible for a action with the processes.
   Search through the action of kernel and describe what is the
   action?
Ans- In general, the operating system must save the state of the currently running process and re-
        store the state of the process scheduled to be run next. Saving the state of a process typically in-
        cludes the values of all the CPU registers in addition to memory allocation. Con- text switches
        must also perform many architecture specific operations, including flushing data and instruction
        caches.




        6- Considering both the system level and the programmer level.

        Consider the advantage and disadvantage of the following
        structure.
              a-)Synchronous and asynchronous communication.


  A benefit of sym- metric communication is that it allows a rendezvous between the sender
and receiver. A disadvantage of a blocking send is that a rendezvous may not be required and the
message could be de- livered asynchronously; received at a point of no interest to the sender. As a
result, message-passing systems often provide both forms of synchronization



            b )Automatic and explicit buffering.
            Automatic buffering provides a queue with indefinite length; thus ensuring the sender will
            never have to block while waiting to copy a message. There are no specifications how
            automatic buffering will be provided; one scheme may reserve sufficiently large memory
            where much of the memory is wasted. Explicit buffering specifies how large the buffer is. In
            this situation, the sender may be blocked while waiting for available space in the queue.
            However, it is less likely memory will be wasted with explicit buffering.




            C ) Send by copy and send by reference
            Send by copy does not allow the receiver to alter the state of the parameter; send by
            reference does allow it. A benefit of send by reference is that it allows the programmer to
            write a distributed version of a centralized application. Java’s RMI provides both,
            however passing a parameter by reference requires declaring the parameter as a
            remote object as well.
d ) Fixed-sized and variable-sized messages.
The implications of this are mostly related to buffering issues; with fixed-size mes- sages, a
buffer with a specific size can hold a known number of messages. The number of variable-
sized messages that can be held by such a buffer is unknown. Consider how Windows 2000
handles this situation: with fixed-sized messages (anything< 256 bytes), the messages are
copied from the address space of the sender to the address space of the receiving process.
Larger mes- sages (i.e. variable-sized messages) use shared memory to pass the message

More Related Content

What's hot

Distributed Shared Memory
Distributed Shared MemoryDistributed Shared Memory
Distributed Shared MemoryPrakhar Rastogi
 
Computer Architecture: A quantitative approach - Cap4 - Section 1
Computer Architecture: A quantitative approach - Cap4 - Section 1Computer Architecture: A quantitative approach - Cap4 - Section 1
Computer Architecture: A quantitative approach - Cap4 - Section 1Marcelo Arbore
 
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEMC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEAravind NC
 
Distributed system unit II according to syllabus of RGPV, Bhopal
Distributed system unit II according to syllabus of  RGPV, BhopalDistributed system unit II according to syllabus of  RGPV, Bhopal
Distributed system unit II according to syllabus of RGPV, BhopalNANDINI SHARMA
 
Client-centric Consistency Models
Client-centric Consistency ModelsClient-centric Consistency Models
Client-centric Consistency ModelsEnsar Basri Kahveci
 
Memory consistency models
Memory consistency modelsMemory consistency models
Memory consistency modelspalani kumar
 
Multiple processor (ppt 2010)
Multiple processor (ppt 2010)Multiple processor (ppt 2010)
Multiple processor (ppt 2010)Arth Ramada
 
Distributed Shared Memory Systems
Distributed Shared Memory SystemsDistributed Shared Memory Systems
Distributed Shared Memory SystemsArush Nagpal
 
INTRODUCTION TO PARALLEL PROCESSING
INTRODUCTION TO PARALLEL PROCESSINGINTRODUCTION TO PARALLEL PROCESSING
INTRODUCTION TO PARALLEL PROCESSINGGS Kosta
 
Chapter 08
Chapter 08Chapter 08
Chapter 08 Google
 
Distributed system lectures
Distributed system lecturesDistributed system lectures
Distributed system lecturesmarwaeng
 
Operating System Chapter 4 Multithreaded programming
Operating System Chapter 4 Multithreaded programmingOperating System Chapter 4 Multithreaded programming
Operating System Chapter 4 Multithreaded programmingguesta40f80
 
Distributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere MortalsDistributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere MortalsEnsar Basri Kahveci
 

What's hot (20)

Distributed shared memory ch 5
Distributed shared memory ch 5Distributed shared memory ch 5
Distributed shared memory ch 5
 
Distributed Shared Memory
Distributed Shared MemoryDistributed Shared Memory
Distributed Shared Memory
 
Chap 4
Chap 4Chap 4
Chap 4
 
Computer Architecture: A quantitative approach - Cap4 - Section 1
Computer Architecture: A quantitative approach - Cap4 - Section 1Computer Architecture: A quantitative approach - Cap4 - Section 1
Computer Architecture: A quantitative approach - Cap4 - Section 1
 
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEMC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
 
Distributed system unit II according to syllabus of RGPV, Bhopal
Distributed system unit II according to syllabus of  RGPV, BhopalDistributed system unit II according to syllabus of  RGPV, Bhopal
Distributed system unit II according to syllabus of RGPV, Bhopal
 
Client-centric Consistency Models
Client-centric Consistency ModelsClient-centric Consistency Models
Client-centric Consistency Models
 
Memory consistency models
Memory consistency modelsMemory consistency models
Memory consistency models
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
Buffer management
Buffer managementBuffer management
Buffer management
 
Replication in the Wild
Replication in the WildReplication in the Wild
Replication in the Wild
 
Multiple processor (ppt 2010)
Multiple processor (ppt 2010)Multiple processor (ppt 2010)
Multiple processor (ppt 2010)
 
Distributed Shared Memory Systems
Distributed Shared Memory SystemsDistributed Shared Memory Systems
Distributed Shared Memory Systems
 
Parallel Processing Concepts
Parallel Processing Concepts Parallel Processing Concepts
Parallel Processing Concepts
 
INTRODUCTION TO PARALLEL PROCESSING
INTRODUCTION TO PARALLEL PROCESSINGINTRODUCTION TO PARALLEL PROCESSING
INTRODUCTION TO PARALLEL PROCESSING
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Distributed system lectures
Distributed system lecturesDistributed system lectures
Distributed system lectures
 
Operating System Chapter 4 Multithreaded programming
Operating System Chapter 4 Multithreaded programmingOperating System Chapter 4 Multithreaded programming
Operating System Chapter 4 Multithreaded programming
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Distributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere MortalsDistributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere Mortals
 

Similar to CSE-316 Homework 1 Operating System

CS8603_Notes_003-1_edubuzz360.pdf
CS8603_Notes_003-1_edubuzz360.pdfCS8603_Notes_003-1_edubuzz360.pdf
CS8603_Notes_003-1_edubuzz360.pdfKishaKiddo
 
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...vtunotesbysree
 
Distributed system notes unit I
Distributed system notes unit IDistributed system notes unit I
Distributed system notes unit INANDINI SHARMA
 
Operating Systems
Operating Systems Operating Systems
Operating Systems Fahad Shaikh
 
Distributed system
Distributed systemDistributed system
Distributed systemchirag patil
 
Os files 2
Os files 2Os files 2
Os files 2Amit Pal
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systemsvampugani
 
Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Gaurav Kakade
 
System Structure for Dependable Software Systems
System Structure for Dependable Software SystemsSystem Structure for Dependable Software Systems
System Structure for Dependable Software SystemsVincenzo De Florio
 
Bca2010 – operating system
Bca2010 – operating systemBca2010 – operating system
Bca2010 – operating systemsmumbahelp
 
Operating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxOperating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxPrudhvi668506
 
ITT Project Information Technology Basic
ITT Project Information Technology BasicITT Project Information Technology Basic
ITT Project Information Technology BasicMayank Garg
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systemsvampugani
 
Distributed computing ).ppt him
Distributed computing ).ppt himDistributed computing ).ppt him
Distributed computing ).ppt himHimanshu Saini
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsNational Cheng Kung University
 

Similar to CSE-316 Homework 1 Operating System (20)

CS8603_Notes_003-1_edubuzz360.pdf
CS8603_Notes_003-1_edubuzz360.pdfCS8603_Notes_003-1_edubuzz360.pdf
CS8603_Notes_003-1_edubuzz360.pdf
 
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
 
Distributed system notes unit I
Distributed system notes unit IDistributed system notes unit I
Distributed system notes unit I
 
I0935053
I0935053I0935053
I0935053
 
Operating Systems
Operating Systems Operating Systems
Operating Systems
 
Distributed system
Distributed systemDistributed system
Distributed system
 
Os files 2
Os files 2Os files 2
Os files 2
 
Wiki 2
Wiki 2Wiki 2
Wiki 2
 
Dos unit3
Dos unit3Dos unit3
Dos unit3
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systems
 
Operating system
Operating systemOperating system
Operating system
 
Os
OsOs
Os
 
Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)
 
System Structure for Dependable Software Systems
System Structure for Dependable Software SystemsSystem Structure for Dependable Software Systems
System Structure for Dependable Software Systems
 
Bca2010 – operating system
Bca2010 – operating systemBca2010 – operating system
Bca2010 – operating system
 
Operating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxOperating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptx
 
ITT Project Information Technology Basic
ITT Project Information Technology BasicITT Project Information Technology Basic
ITT Project Information Technology Basic
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Distributed computing ).ppt him
Distributed computing ).ppt himDistributed computing ).ppt him
Distributed computing ).ppt him
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
 

CSE-316 Homework 1 Operating System

  • 1. CSE-316 (OPERATING SYSTEM) HOMEWORK 1 Submitted by- Tej prakash RM2801A20 10803816 Part A
  • 2. 1. In a multiprogramming and time sharing environment, several users share the system simultaneously. This situation can result in various security problems. a) What are two such problems? Ans- a. St e a l i n g or co p y i n g on e’ s pr o g r a m s or da t a ; us i n g sy s - te m re s o u r c e s ( CP U , m e m o r y , di s k sp a c e , pe r i p h e r a l s ) wi t h o u t pr o p e r ac - coun t i n g .. b) Can we ensure the same degree of security in a time shared machine as in a dedicated machine? Explain your answer. . Pr o b a b l y no t , si n c e an y pr o t e c t i o n sc h e m e de v i s e d by hu m a n sc a n in e v i t a b l y be br o k e n by a hu m a n , an d th e mo r e c o m p l e x th e sc h e m e , th e mo r e di f f i c u l t it is to fe e l c o n f i d e n t of it s co r r e c t im p l e m e n t a t i o n . 2. Under what circumstances would a user be better off using a time sharing system rather than a PC or single user workstation? Ans- When there are few other users, the task is large, and the hardware is fast, time-sharing makes sense. The full power of the system can be brought to bear on the user’s problem. The problem can be solved faster than on a personal computer. Another case occurs when lots of other users need resources at the same time. A personal computer is best when the job is small enough to be executed reasonably on it and when performance is sufficient to execute the program to the user’s satisfaction
  • 3. 3. In the designing of the operating system there are two approaches modular kernel and layered approach? How are they different? The modularkernelapproach requiressubsystems to inter - actwitheach otherthrough careful y l constructedinter - faces thatare typica l narrow (in terms of the funct ly ion - ali thatisexposed to externalmodules). The layered ker ty - nelapproach issimi r thatrespect. However, the lay la in - ered kernelimposes a str t ic orderingof subsystems such thatsubsystems at the lowerlayersare not allowed to in - voke operationscorresponding to the upper-layersubsys - tems. There are no such restr c i inthe modular- ernel i t ons k approach, whereinmodules are freeto invoke each other withoutany constra ts. in Part B 4. There is guest operating system and a host operating system like VMware? List all the factors in choosing the host operating system? Ans- Guest operatingsystem provides i serviceby ts mapping them intothe functional t provided by the host iy operatingsystem.a key issue thatneeds to be considered in choosing the hostoperatingsystem iswhetheritis suff c en l generalinterms of system cal inter ii ty l facein orderto be able to supportthe functional t associated iy withthe guestoperatingsystem. 5- The kernel is responsible for a action with the processes. Search through the action of kernel and describe what is the action?
  • 4. Ans- In general, the operating system must save the state of the currently running process and re- store the state of the process scheduled to be run next. Saving the state of a process typically in- cludes the values of all the CPU registers in addition to memory allocation. Con- text switches must also perform many architecture specific operations, including flushing data and instruction caches. 6- Considering both the system level and the programmer level. Consider the advantage and disadvantage of the following structure. a-)Synchronous and asynchronous communication. A benefit of sym- metric communication is that it allows a rendezvous between the sender and receiver. A disadvantage of a blocking send is that a rendezvous may not be required and the message could be de- livered asynchronously; received at a point of no interest to the sender. As a result, message-passing systems often provide both forms of synchronization b )Automatic and explicit buffering. Automatic buffering provides a queue with indefinite length; thus ensuring the sender will never have to block while waiting to copy a message. There are no specifications how automatic buffering will be provided; one scheme may reserve sufficiently large memory where much of the memory is wasted. Explicit buffering specifies how large the buffer is. In this situation, the sender may be blocked while waiting for available space in the queue. However, it is less likely memory will be wasted with explicit buffering. C ) Send by copy and send by reference Send by copy does not allow the receiver to alter the state of the parameter; send by reference does allow it. A benefit of send by reference is that it allows the programmer to write a distributed version of a centralized application. Java’s RMI provides both, however passing a parameter by reference requires declaring the parameter as a remote object as well.
  • 5. d ) Fixed-sized and variable-sized messages. The implications of this are mostly related to buffering issues; with fixed-size mes- sages, a buffer with a specific size can hold a known number of messages. The number of variable- sized messages that can be held by such a buffer is unknown. Consider how Windows 2000 handles this situation: with fixed-sized messages (anything< 256 bytes), the messages are copied from the address space of the sender to the address space of the receiving process. Larger mes- sages (i.e. variable-sized messages) use shared memory to pass the message