0% found this document useful (0 votes)
20 views4 pages

Os Assignment 1

Uploaded by

Jv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views4 pages

Os Assignment 1

Uploaded by

Jv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Assignment Sheet – 1

Course: B.Tech (CSE) Year/Semester: II/IV Session: 2023-2024


Subject Name & Code: Operating Systems (BCSC 0004)
Max. Marks: 10 Time allowed: 1 week

Set-1: Roll No. 1-12


1. Give two reasons why caches are useful? What problems do they solve? What problems do
they cause? If a cache can be made as large as the device for which it is caching (for instance,
a cache as large as a disk), why not make it that large and eliminate the device?

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.

3. The following C program is executed on a Unix/Linux system:


#include < unistd.h >
int main ()
{
int i ;
for (i=0; i<10; i++)
if (i%2 == 0) fork ( ) ;
return 0 ;
}

The total number of child processes created is _____.

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.

5. In a multiprogramming and time-sharing environment, several users share the system


simultaneously. This situation can result in various security problems. What are two such
problems?

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

Set-2: Roll No. 13-24


8. Under what circumstances, it is suitable to use time-sharing system rather than a PC or a
single user workstation? Explain.

9. Describe the operating system's two modes of operation.


10. Describe the relationship between an API, the system-call interface, and the operating
system.

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?

Set-3: Roll No. 25-36


15. How do clustered systems differ from multiprocessor systems? What is required for two
machine belonging to a cluster to cooperate to provide a highly available service?

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.

Set-4: Roll 37-48


22. Describe the concept of a "blocked" or "waiting" state in a process. When and why does a
process enter this state?

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;
}

28. What is the purpose of system calls?

Set-5: Roll No. 49-60


29. Explain why an operating system can be viewed as a resource allocator.

30. Why are clustered systems considered to provide high-availability service?

31. If we don’t use any operating system, what all will be the challenges faced by the user?

32. Predict the output?


#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>

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?

Set-6: Roll No. 61-till last


36. What are the main purposes of an operating system?

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?

39. Predict the output?


#include <stdio.h>
#include <unistd.h>
int main()
{
fork();
fork() && fork() || fork();
fork();

printf("forked\n");
return 0;
}

40. Explain how context switching works when a process transitions between different states in
an operating system.

41. Explain why Google Chrome uses multiple processes.

42. List out some reasons for process termination.

43. Describe the differences between symmetric and asymmetric multiprocessing. What are three
advantages and one disadvantage of multiprocessor systems?

*****************Best Wishes******************

You might also like