Os Assignment 1
Os Assignment 1
2. Some early computers protected the operating system by placing it in a memory partition that
could not be modified by either the user job or the operating system itself. Describe two
difficulties that you think could arise with such a scheme.
4. There are two different ways that commands can be processed by a command interpreter.
One way is to allow the command interpreter to contain the code needed to execute the
command. The other way is to implement the commands through system programs.
Compare and contrast the two approaches.
6. What is the role of the "terminated" state in the process life cycle, and how does a process
reach this state?
7. The issue of resource utilization shows up in different forms in different types of operating
systems. List what resources must be managed carefully in the following settings:
a. Mainframe or minicomputer systems
b. Workstations connected to servers
11. Examine the given lines of code. How many numbers of Processes created?
#include <stdio.h>
#include <unistd.h>
int main()
{
int i;
for (i = 0; i < 4; i++)
fork();
return 0;
}
12. Enlighten briefly – “7 State Process transition diagram”.
13. Explain the fundamental differences between the UNIX fork() and Windows
CreateProcess() functions.
14. What are the five major activities of an operating system with regard to file management?
16. What is the main advantage of the layered approach to system design? What are the
disadvantages of the layered approach?
17. What is the main advantage of the microkernel approach to system design? How do user
programs and system services interact in a microkernel architecture? What are the
disadvantages of using the microkernel approach?
18. What are the three major activities of an operating system with regard to secondary-storage
management?
19. What are the three major activities of an operating system with regard to memory
management?
20. Explain the life cycle of a process and the different states it transitions through in an
operating system.
21. Explain the difference between an I/O-bound process and a CPU-bound process.
23. How does the operating system handle the transition from the "ready" state to the
"running" state for a process? What scheduling mechanisms are involved?
24. Discuss the different types of operating system with their pros and cons:
a) Spooling
b) Multiprogramming
c) Multitasking
d) Multiprocessing
e) Real Time system
f) Distributed System
25. Explain why a modular kernel may be the best of the current operating system design
techniques.
26. Discuss the significance of the "process state diagram" in understanding the behavior of a
process in an operating system?
27. Examine the given lines of code. How many numbers of Processes created?
#include <stdio.h>
#include <unistd.h>
int main()
{
int i;
for (i = 0; i < 5; i++)
fork();
return 0;
}
31. If we don’t use any operating system, what all will be the challenges faced by the user?
void forkexample()
{
int x = 1;
if (fork() == 0)
printf("Child has x = %d\n", ++x);
else
printf("Parent has x = %d\n", --x);
}
int main()
{
forkexample();
return 0;
}
33. What are the five major activities of an operating system with regard to process management?
34. Discuss the differences between 5 state and 7 state process transition diagrams.
35. What system calls have to be executed by a command interpreter or shell in order to start a
new process?
37. Discuss different types of schedulers? Explain queuing diagram representation of process
scheduler with a diagram.
38. How does a process transition from the "new" state to the "ready" state, and what factors
influence this transition?
printf("forked\n");
return 0;
}
40. Explain how context switching works when a process transitions between different states in
an operating system.
43. Describe the differences between symmetric and asymmetric multiprocessing. What are three
advantages and one disadvantage of multiprocessor systems?
*****************Best Wishes******************