Sunteți pe pagina 1din 4

HOMEWORK -1 COURSE CODE: CSE213 COURSE NAME: Principles of Operating system PART-A Ques1.

a) Under what circumstances would a user be better off using a time sharing system rather than a PC or a single-user workstation? b) Some computer systems do not provide a privileged mode of operation in hardware. Is it possible to construct a secure Operating system for these computer systems? Give arguments that it is and that it is not possible. Ques2. a) Describe a mechanism for enforcing memory protection in order to prevent a program from modifying the memory associated with other programs. b) Why the command interpreter is usually separate from the kernel? Would it be possible for the user to develop a new command interpreter using the system-call interface provided by the operating system? Ques3. a) How does the distinction between monitor mode and user mode function as a rudimentary form of protection (security) system?
Monitor or privileged mode is implemented in hardware as a bit that indicates the operating system is performing a privileged command. In user mode the bit is set to 1 and privileged operations cannot be performed on certain hardware. But putting the operating system in control of the monitor we can validate a user's request to access hardware. That is, the user must request hardware access through the operating system since it is only this system that can run in monitor mode. Thus, in theory a user cannot access hardware without first

having access to that hardware.

b) Describe how you could obtain a statistical profile of the amount of time spent by a program executing different sections of its code. Discuss the importance of obtaining such a statistical profile. PART-B Ques4. a) It is sometimes difficult to achieve a layered approach if two components of the operating system are dependent on each other. Identify a scenario in which it is unclear how to layer two system components that require tight coupling of their functionality.

Answer: The virtual memory subsystem and the storage subsystem are typically tightly coupled and requires careful design in a layered system due to the following interactions. Many systems allow les to be mapped into the virtual memory space of an executing process. On the other hand, the virtual memory subsystem typically uses the storage system to provide the backing store for pages that do not currently reside in memory. Also, updates to the le system are sometimes buffered in physical memory before it is ushed to disk, thereby requiring careful coordination of the usage of memory between the virtual memory subsystem and the le system.
b) How do user programs and system services interact in a microkernel architecture? What are the advantages of using the microkernel approach? Ques5. a) In what ways is the modular kernel approach similar to the layered approach? In what ways does it differ from the layered approach? b) Can a multithreaded solution using multiple user-level threads achieve

better performance on a multiprocessor system than on a single-processor system?

A multithreaded system comprising of multiple user-level threads cannot make useof the different processors in a multiprocessor system simultaneously. The operatingsystem sees only a single process and will not schedule the different threads of the process on separate processors. Consequently, there is no performance benefitassociated with executing multiple userlevel threads on a multiprocessor system.

Ques6) Consider the following set of processes, with the length of the CPUburst time given in milliseconds: Process P1 P2 P3 P4 P5 Burst time 10 1 2 1 5 Priority 3 1 3 4 2

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF, a non-preemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 1) scheduling. b. What is the waiting time of each process for each of the scheduling algorithms in part a? c. Which of the schedules in part a results in the minimal average waiting time (over all processes)?

S-ar putea să vă placă și