Escolar Documentos
Profissional Documentos
Cultura Documentos
Tutorial 2
Tutorial 2
Q1. Compare microkernel with monolithic kernels.
Monolithic Kernels Monolithic systems have large kernels that include most operating system services, including process, memory, file name, and device management as well as interprocess communication. Another word for monolithic is secure Large bigger size than Microkernel No easy to extend. Bad Maintenance. If want to modify some feature on this kernel, its need to recompile for all kernel. So I take longer time to complete. Eg: Linux, Dots, Unix Microkernel Kernels Microkernels only provide minimal services (Basic Service) on Operating System, such as interprocess communication and limited device, process, thread, and memory management. All other services are implemented above the kernel as user-space operating system services. Example, minic, Machinston. -Easy to extend and reconfigure -Easy Design and implement Eg: Window 7,Minix ,Omiga OS
1
-sh-
Tutorial 2
Q5. compare divisible process with indivisible process. Indivisible processes -Entire process must be assign to a single processor
-Not able to take advantage of the additional resources available in a distributed and parallel environment.
Divisible processes - a process may be subdivided into smaller sub-processes, tasks, or threads.
Q6. Differentiate kernel-level support threads with user level support threads. User-level support Kernel-level support Table = number of entry flexible Table = number of entry fix Run faster kernel trap (doesnt involve OS, no Run slower kernel trap need memory) Type of scheduling Under control fully control by kernel If 1 state thread of process block then whole process been block (not suitable in use where system always been block)
1) Operating system has the knowledge of existence of kernel level threads while it does not know about the existence of user-level threads. 2) Suppose a process P1 has 2 kernel level threads and P2 has 2 user-level threads. If one thread in P1 gets blocked, its second thread is not affected. But in case of P2 if one thread is blocked (say for I/O), the whole process P2 along with the 2nd thread gets blocked. 3) Kernel level threads are slower to create compared to user-level threads. 4) Switching in Kernel level thread involves OS scheduler while in user-level threads OS scheduler is not involved. 5) Context switching between kernel level threads has high overhead, almost the same as a process. Context switching between user-level threads has almost no overhead as compared to kernel level threads. 6) Kernel level threads can run on different processors simultaneously while user-level threads of a process will run on one processor only even if multiple processors are available. 7) User level support threads are faster than kernel level support thread than 100times.
2
-sh-
Tutorial 2
Advantages: -The primary advantages of user-level threads are efficiency and flexibility. Because the operating system is not involved, user-level threads can be made to use very little memory and can be created and scheduled very quickly. - user able to decide which thread to process first, able to select which thread to proceed first. - User-level threads are also more flexible because the thread scheduler is in user code, which makes it much easier to schedule threads in an intelligent fashion -- for example, the application's priority structure can be directly used by the thread scheduler. - Table, run more faster than kernel-level, scalability Disadvantages The primary disadvantage of user-level threads compared to kernel threads is the lack of operating system support. For example, when a user-level thread makes a blocking call, the kernel does not start running another user-level thread. Instead, the kernel suspends the entire calling kernel thread or process, even though another user-level thread might be ready to run
Q8. Describe two disadvantages of utilizing a polled-loop scheduler for system scheduling.
Advantages: - Simple to write and debug /Very easy to code and debug. - The response time is easy to determine /Response time is easy to determine. - Excellent for handling high-speed data channels Disadvantages: - Not generally sufficient to handle complex systems/ cannot handle asynchronous events. - Inherently waste CPU time /Waste of CPU time, especially, when the program is continuously monitoring a status flag or variable. -May be too slow response time for certain parts of the system -Not suitable used in real time systems. -Busy in asking processor, because it not reactive, it occur to delay, _ latency due to the time necessary for communications, -The communication cost for getting or moving the data if they are not at the same location that the process is assigned to execute.
Q10. How many data type translations are necessary in a heterogeneous environment with seven different architectures without using EDR? With using EDR? - (n)2 - n = (7)2-7 = 42
3
-sh-