01.) Lab Manual - OS - 22 - 23 - Updated
01.) Lab Manual - OS - 22 - 23 - Updated
01.) Lab Manual - OS - 22 - 23 - Updated
Lab Manual
Second Year Semester-IV
Subject: Operating System
Even Semester
1
Institutional Vision and Mission
Our Vision
To foster and permeate higher and quality education with value added engineering, technology
programs, providing all facilities in terms of technology and platforms for all round development with
societal awareness and nurture the youth with international competencies and exemplary level of
employability even under highly competitive environment so that they are innovative adaptable and
capable of handling problems faced by our country and world at large.
Our Mission
The Institution is committed to mobilize the resources and equip itself with men and materials of
excellence thereby ensuring that the Institution becomes pivotal center of service to Industry,
academia, and society with the latest technology. RAIT engages different platforms such as
technology enhancing Student Technical Societies, Cultural platforms, Sports excellence centers,
Entrepreneurial Development Center and Societal Interaction Cell. To develop the college to become
an autonomous Institution & deemed university at the earliest with facilities for advanced research
and development programs on par with international standards. To invite international and reputed
national Institutions and Universities to collaborate with our institution on the issues of common
interest of teaching and learning sophistication.
OurQualityPolicy
Itisourearnestendeavourtoproducehighqualityengineeringprofessionalswhoare
innovative and inspiring, thought and action leaders, competent to solve problems
facedbysociety,nationandworldatlargebystrivingtowardsveryhighstandardsinlearning,tea
chingandtrainingmethodologies.
Dr. Vijay 2
D.PatilPresident,
RAES
Departmental VisionandMission
Vision
To impart higher and quality education in Computer Science with value added engineering and
technology programs to prepare technically sound, ethically strong engineers with social
awareness. To extend the facilities, to meet the fast changing requirements and nurture the youths
with international competencies and exemplary level of employability and research under highly
competitive environments.
Mission
To mobilize the resources and equip the department with men and materials of excellence to
provide knowledge in the thrust areas of Computer Science and Engineering. To provide learning
ambiance and exposure to the latest tools and technologies and the platforms to work on research
and live projects. To provide the diverse platforms of sports, technical, co-curricular and
extracurricular activities for the overall development of student with ethical attitude. To prepare the
students to sustain the impact of computer education for social needs encompassing industry,
educational institutions and public service. To collaborate with IITs, reputed universities and
industries for the technical and overall upliftment of students for continuing learning and
entrepreneurship.
3
Departmental Program Educational
Objectives (PEOs)
1. Learn and Integrate
To provide Computer Engineering students with a strong foundation in the mathematical,
scientific and engineering fundamentals necessary to formulate, solve and analyze
engineering problems and to prepare them for graduate studies.
3. Broad Base
To provide broad education necessary to understand the science of computer engineering and
the impact of it in a global and social context.
4. Techno-leader
To provide exposure to emerging cutting edge technologies, adequate training &
opportunities to work as teams on multidisciplinary projects with effective communication
skills and leadership qualities.
5. Practice citizenship
To provide knowledge of professional and ethical responsibility and to contribute to society
through active engagement with professional societies, schools, civic organizations or other
community activities.
4
Departmental Program Outcomes (POs)
PO2: Problem analysis: Identify, formulate, review research literature, and analyze
complex engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
PO3 : Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate consideration
for the public health and safety, and the cultural, societal, and environmental considerations.
PO4: Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis of the
information to provide valid conclusions.
PO5: Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modelling to complex engineering activities with an
understanding of the limitations.
PO6: The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
PO7: Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need for
sustainable development.
PO8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
PO9: Individual and team work: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings.
PO11 : Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and leader
in a team, to manage projects and in multidisciplinary environments.
PO12 : Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
5
Program Specific Outcomes: PSO
PSO1: To build competencies towards problem solving with an ability to understand, identify,
analyze and design the problem, implement and validate the solution including both hardware and
software.
PSO2: To build appreciation and knowledge acquiring of current computer techniques with an ability
to use skills and tools necessary for computing practice.
PSO3: To be able to match the industry requirements in the area of computer science and
engineering. To equip skills to adopt and imbibe new technologies.
6
Index
Sr. No. Contents Page No.
1. List of Experiments 8
Course Objective, Course Outcome &
2. 9
Experiment Plan
3. CO-PO ,CO-PSO Mapping 11
4. Study and Evaluation Scheme 14
5. Experiment No. 1 15
6. Experiment No. 2 23
7. Experiment No. 3 27
8. Experiment No. 4 31
9. Experiment No. 5 36
10. Experiment No. 6 40
11. Experiment No. 7 44
12. Experiment No. 8 48
13. Experiment No. 9 54
14. Experiment No. 10 60
7
List of Experiments
Sr. No. Experiments Name
Explore Linux Commands
Explore usage of basic Linux Commands and system calls for file, directory
1 and process management. For eg: (mkdir, chdir, cat, ls, chown, chmod, chgrp,
ps etc. system calls: open, read, write, close, getpid, setpid, getuid, getgid,
getegid, geteuid. sort, grep, awk, etc.)
Linux- Process
4 Create a child process in Linux using the fork system call. From the child
process obtain the process ID of both child and parent by using getpid and
getppid system call.
8
Memory Management
8 Write a program to demonstrate the concept of dynamic partitioning placement
algorithms i.e. Best Fit, First Fit, Worst-Fit etc.
Memory Management: Virtual Memory
9
Write a program in C demonstrate the concept of page replacement policies for
handling page faults eg: FIFO, LRU etc.
9
Course Objective, Course Outcome &
Experiment Plan
Course Objective:
Course Outcomes:
CO1 Demonstrate basic Operating system Commands, Shell scripts, System Calls and
API wrt Linux
CO2 Implement various process scheduling algorithms and evaluate their performance
CO3 Implement and analyze concepts of synchronization and deadlocks
CO4 Implement various Memory Management techniques and evaluate their
performance
CO5 Implement and analyze concepts of virtual memory
CO6 Demonstrate and analyze concepts of file management and I/O management
techniques
10
Experiment Plan:
Module Week Course Weightage
Experiments Name
No. No. Outcome
Explore Linux Commands
Explore usage of basic Linux Commands and
system calls for file, directory and process
1 W1 CO1 03
management. For eg: (mkdir, chdir, cat, ls,
chown, chmod, chgrp, ps etc. system calls:
open, read, write, close, getpid, setpid, getuid,
getgid, getegid, geteuid. sort, grep, awk, etc.)
Linux- Process
Create a child process in Linux using the fork
system call. From the child process obtain the
4 W4 CO2 05
process ID of both child and parent by using
getpid and getppid system call.
11
Producer consumer problem through
Semaphore
12
Mapping of COs with POs:
Demonstrate basic
CO1 Operating system
Commands, Shell scripts, 3 1 2 1 2 1
System Calls and API wrt
Linux
Implement various process
CO2 scheduling algorithms and 1 2 2 2 2 1
evaluate their performance
Implement and analyze
CO3 concepts of
1 2 2 2 2 1
PRATI synchronization and
CAL deadlocks
80% Implement various
CO4 Memory Management
1 3 3 2 1
techniques and evaluate
their performance
Implement and analyze
CO5 concepts of virtual 1 2 2 3 1 1
memory
Demonstrate and analyze
CO6 concepts of file
1 2 2 3 1 1
management and I/O
management techniques
Demonstrate basic
CO1 Operating system
Commands, Shell scripts, 3 1 2 1 2 1
System Calls and API wrt
Linux
THEOR
Y Implement various process
CO2 scheduling algorithms and 1 2 2 2 2 1
20%
evaluate their performance
Implement and analyze
CO3 concepts of
1 2 2 2 2 1
synchronization and
deadlocks
13
Implement various
CO4 Memory Management
1 3 3 2 1
techniques and evaluate
their performance
Implement and analyze
CO5 concepts of virtual 1 2 2 3 1 1
memory
Demonstrate and analyze
CO6 concepts of file
1 2 2 3 1 1
management and I/O
management techniques
14
Study and Evaluation Scheme
Course
Course Name Teaching Scheme Credits Assigned
Code
CSL403 Operating Theory Practical Tutorial Theory Practical Tutorial Total
System 04 02 -- 04 01 -- 05
Term Work:
Practical/Experiments:
1. The final certification and acceptance of term work ensures that satisfactory perfor
mance of laboratory work and minimum passing marks in term work.
15
Operating System
Experiment No. : 1
16
Experiment No. 1
1. Aim: Explore usage of basic Linux Commands and system calls for file, directory and
process management. For eg: (mkdir, chdir, cat, ls, chown, chmod, chgrp, ps etc.
system calls: open, read, write, close, getpid, setpid, getuid, getgid, getegid, geteuid.
sort, grep, awk, etc.)
5. Theory:
NAME
a)
SYNTAX
pwd
DESCRIPTION
SYNTAX
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default). Sort entries alphabetically
if none of -cftuvSUX nor --sort is specified.
17
NAME
SYNTAX
mkdir DIRECTORY(ies)
DESCRIPTION
SYNTAX
DESCRIPTION
SYNTAX
DESCRIPTION
Each manual page has a short description available within it. whatissearches the manual
page names and displays the manual page descriptions of any name matched.
NAME
f)
SYNTAX
DESCRIPTION
man is the system's manual pager. Each page argument given to man is normally the name of
a program, utility or function. The manual page associated with each of these arguments is then
found and displayed.
NAME
g)
SYNTAX
18
DESCRIPTION
SYNTAX
DESCRIPTION
SYNTAX
rm [OPTION]... FILE...
DESCRIPTION
This manual page documents the GNU version of rm. rm removes each specified file. By
default, it does not remove directories.
-f :: ignore nonexistent files and arguments, never prompt
SYNTAX
DESCRIPTION
19
Print the first 10 lines of each FILE to standard output. With more than one FILE, precede
each with a header giving the file name. With no FILE, or when FILE is -, read standard input.
SYNTAX
DESCRIPTION
Print the last 10 lines of each FILE to standard output. With more than one FILE, precede
each with a header giving the file name. With no FILE, or when FILE is -, read standard input.
SYNTAX
chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL-MODE FILE...
DESCRIPTION
This manual page documents the GNU version of chmod. chmod changes the file mode bits
of each given file according to mode, which can be either a symbolic representation of changes
to make, or an octal number representing the bit pattern for the new mode bits.
20
m)
NAME
SYNTAX
DESCRIPTION
SYNTAX
grep [OPTIONS] PATTERN [FILE...]
grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]
21
DESCRIPTION
grep searches the named input FILEs (or standard input if no files are named, or if a single
hyphen-minus (-) is given as file name) for lines containing a match to the given PATTERN. By
default, grep prints the matching lines.
-i :: Ignore case distinctions in both the PATTERN and the input files.
-o :: Print only the matched (non-empty) parts of a matching line, with each such
part on a separate output line.
-n :: Prefix each line of output with the 1-based line number within its input file
NAME
o)
SYNTAX
wc [OPTION]... [FILE]...
DESCRIPTION
Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is
specified. With no FILE, or when FILE is -, read standard input. A word is a non-zero-length
sequence of characters delimited by white space. The options below may be used to select which
counts are printed, always in the following order: newline, word, character, byte, maximum line
length.
SYNTAX
DESCRIPTION
SYNTAX
22
DESCRIPTION
The cal utility displays a simple calendar in traditional format. If arguments are not specified,
the current month is displayed.
NAME
r)
SYNTAX
DESCRIPTION
SYNTAX
DESCRIPTION
Display the current time in the given FORMAT, or set the system date.
t)
NAME
SYNTAX
clear
DESCRIPTION
Return type: getppid() returns the process ID of the parent of the current process.
It never throws any error therefore is always successful.
NOTE: At some instance of time, it is not necessary that child process will execute
23
first or parent process will be first allotted CPU, any process may get CPU
assigned, at some quantum time. Moreover, process id may differ during different
executions.
2. getpid() : returns the process ID of the calling process. This is often used by routines
that generate unique temporary filenames.
Syntax:
pid_tgetpid(void);
Return type: getpid() returns the process ID of the current process. It never throws
any error therefore is always successful
v)
Linux provides us a utility called ps for viewing information related with the processes on a
system which stands as abbreviation for “Process Status”. ps command is used to list the
currently running processes and their PIDs along with some other information depends on
different options. It reads the process information from the virtual files in /proc file-system.
/proc contains virtual files, this is the reason it’s referred as a virtual file system.
ps provides numerous options for manipulating the output according to our need.
Syntax –
ps [options]
Options for psCommand :
Simple process selection : Shows the processes for the current shell –
[root@rhel7 ~]#ps
PID TTY TIME CMD
View all processes owned by you : Processes i.e same EUID as ps which means runner of
the ps command, root in this case –
[root@rhel7 ~]#ps -x
ps p process_id
ps -p process_id
24
ps --pidprocess_id
Example :
[root@rhel7 ~]#ps p 27223
Example :
/usr/lib/systemd/systemd -- 1 root 0
[kthreadd] 2 root 0
[ksoftirqd/0] 3 root 2
[kworker/0:0H] 5 root 2
[migration/0] 7 root 2
[rcu_bh] 8 root 2
[rcu_sched] 9 root 2
[watchdog/0] 10 root 2
25
In this example I wish to see command, process ID, username and parent process ID, so I pass
the arguments cmd, pid, user and ppid respectively
w)
System Calls: File Manipulation system calls
Some common system calls are create, delete, read, write, reposition, or close. Also, there is a
need to determine the file attributes – get and set file attribute. Many times the OS provides an
API to make these system calls.
6. Conclusion and Discussion: Thus, we have studied some of the basic Linuxcommands. We
also used the pipe operator for forwarding output one command to other command as input.
7. Viva Questions:
• What is the difference between UNIX and LINUX?
• What is LILO?
• What is Chmod, umask and tty command?
• How do you open a command prompt when issuing a command?
• What is the pwd command?
8. References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall, 8th
Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System Concepts, John
Wiley &Sons , Inc., 9th Edition, 2016.
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
26
Operating System
Experiment No.: 2
27
Experiment No. 2
1. Aim: Write shell scripts to do the following:
a. Display OS version, release number, kernel version
b. Display top 10 processes in descending order
c. Display processes with highest memory usage.
d. Display current logged in user and log name.
e. Display current shell, home directory, operating system type, current path setting, current
working directory.
5. Theory:
The -o (or –format) option of ps allows you to specify the output format. A favorite of mine
is to show the processes’ PIDs (pid), PPIDs (pid), the name of the executable file associated
with the process (cmd), and the RAM and CPU utilization (%mem and %cpu, respectively).
Additionally, I use --sort to sort by either %mem or %cpu. By default, the output will be
sorted in ascendant form, but personally I prefer to reverse that order by adding a minus sign
in front of the sort criteria. To add other fields to the output, or change the sort criteria, refer
to the OUTPUT FORMAT CONTROL section in the man page of ps command.
Display the top ten running process sorted by memory usage, ps returns all the
running process which are then sorted by the 4th field in numerical order and the top 10 are to
STDOUT.
6. Algorithm:
echo “Top 10 processes in descending order are:”
ps -eopid, ppid,cmd,%mem, %cpu --sort=-%mem |head
29
7. Conclusion and Discussion:
Above given statement tested and executed successfully using shell script.
8. Viva Questions:
• What is shell script?
• How to run shell script?
• What are the types of shell?
• What is command line argument?
• What needs to be done before you can run a shell script from the command line prompt?
• How do you terminate a shell script if statement?
• What code would you use in a shell script to determine if a directory exists?
• How do you access command line arguments from within a shell script?
• Within a UNIX shell scripting loop construct, what is the difference between the break
and continue?
9. References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall,
8th Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System
Concepts, John Wiley &Sons , Inc., 9th Edition, 2016.
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd
Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd
Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
30
Operating System
Experiment No.:3
Linux - APIs
31
Experiment No. 3
1. Aim: Implement basic commands of linux like ls, cp, mv and others using kernel APIs.
5. Theory:
• cp—Copy files
OPTIONS
cp -a archive files
cp -f force copy by removing the destination file if needed
cp -i interactive - ask before overwrite
cp -l link files instead of copy
cp -L follow symbolic links
cp -n no file overwrite
cp -R recursive copy (including hidden files)
cp -u update - copy when source is newer than dest
cp -v verbose - print informative messages
DESCRIPTION
These programs list each given file or directory name. Directory contents are sorted
alphabetically. For ls, files are by default listed in columns, sorted vertically, if the standard
32
output is a terminal; otherwise, they are listed one per line. For dir, files are by default listed
in columns, sorted vertically. For vdir, files are by default listed in long format.
OPTIONS
• mv—Rename files
SYNOPSIS
DESCRIPTION
If the last argument names an existing directory, mv moves each other given file into a file
with the same name in that directory. Otherwise, if only two files are given, it moves the first
onto the second. It is an error if the last argument is not a directory and more than two files
are given. It can move only regular files across filesystems. If a destination file is unwritable,
the standard input is a tty, and the –f or --force option is not given, mv prompts the user for
whether to overwrite the file. If the response does not begin with y or Y, the file is skipped.
OPTIONS
33
6. Algorithm:
• Ls command
34
int op_a = 0, op_l = 0;
char *p = (char*)(argv[1] + 1);
while(*p){
if(*p == 'a') op_a = 1;
else if(*p == 'l') op_l = 1;
else{
perror("Option not available");
exit(EXIT_FAILURE);
}
p++;
}
_ls(".",op_a,op_l);
}
}
return 0;
}
• Mv command
#include<sys/types.h>
#include<sys/stat.h>
#include<stdio.h>
#include<fcntl.h>
main( intargc,char *argv[] )
{
int i,fd1,fd2;
char *file1,*file2,buf[2];
file1=argv[1];
file2=argv[2];
printf("file1=%s file2=%s",file1,file2);
fd1=open(file1,O_RDONLY,0777);
fd2=creat(file2,0777);
while(i=read(fd1,buf,1)>0)
write(fd2,buf,1);
remove(file1);
close(fd1);
close(fd2);
}
8. Viva Questions:
• What is Chmod, umask and whois command?
• How cp command works?
• What is pwd,cat command?
• What is grep,awk command?
9. References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall,
8th Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System
Concepts, John Wiley &Sons , Inc., 9th Edition, 2016.
35
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd
Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd
Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
36
Operating System
Experiment No.:4
Linux Process
37
Experiment No. 4
1. Aim:Create a child process in Linux using the fork system call. From the child process obtain
the process ID of both child and parent by using getpid and getppid system call.
5. Theory:
fork():
It is a system call that creates a new process under the UNIX operating system. It takes no
arguments. The purpose of fork() is to create a new process, which becomes the child process
of the caller. After a new child process is created, both processes will execute the next
instruction following the fork() system call. Therefore, we have to distinguish the parent from
the child. This can be done by testing the returned value of fork():
• If fork() returns a negative value, the creation of a child process was unsuccessful.
• fork() returns a zero to the newly created child process.
• fork() returns a positive value, the process ID of the child process, to the parent. The
returned process ID is of type pid_t defined in sys/types.h. Normally, the process ID
is an integer. Moreover, a process can use function getpid() to retrieve the process
IDassigned to this process.
Therefore, after the system call to fork(), a simple test can tell which process is the child.
Note that Unix will make an exact copy of the parent's address space and give it to the child.
Therefore, the parent and child processes have separate address spaces.
pscommand:
The ps command shows the processes we’re running, the process another user is running, or
all the processes on the system. E.g.
38
$ ps –ef
By default, the ps program shows only processes that maintain a connection with a terminal, a
console, a serial line, or a pseudo terminal. Other processes run without needing to
communicate with a user on a terminal. These are typically system processes that Linux uses
to manage shared resources. We can use psto see all such processes using the -e option and to
get “full” information with -f.
Zombie Process:
When achild process terminates, an association with its parent survives until the parent in turn
either terminates normally or calls wait. The child process entry in the process table is
therefore
not freed up immediately. Although no longer active, the child process is still in the system
because its exit code needs to be stored in case the parent subsequently calls wait. It becomes
what is known as defunct, or a zombie process.
Orphan Process:
An orphan process is a computer process whose parent process has finished or terminated,
though itself remains running. A process may also be intentionally orphaned so that it
becomes
detached from the user's session and left running in the background; usually to allow a long
running job to complete without further user attention, or to start an indefinitely running
service.
Under UNIX, the latter kinds of processes are typically called daemon processes. The UNIX
nohupcommand is one means to accomplish this.
Daemon Process:
It is a process that runs in the background, rather than under the direct control of a user; they
are
usually initiated as background processes.
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
39
intmain()
{
printf("Hello world!\n");
return0;
}
Output:
Hello world!
Hello world!
intmain(){
pid_tpid,mypid,myppid;
pid=getpid();
printf("Before fork: Process id is %d\n",pid);
pid=fork();
if(pid<0){
perror("fork() failure\n");
return1;
}
// Child process
if(pid==0){
printf("This is child process\n");
mypid=getpid();
myppid=getppid();
printf("Process id is %d and PPID is %d\n",mypid,myppid);
}else{// Parent process
sleep(2);
printf("This is parent process\n");
mypid=getpid();
myppid=getppid();
printf("Process id is %d and PPID is %d\n",mypid,myppid);
printf("Newly created process id or child pid is %d\n",pid);
40
}
return0;
}
Sample output :
Before fork: Process id is 166629
This is child process
Process id is 166630 and PPID is 166629
Before fork: Process id is 166629
This is parent process
Process id is 166629 and PPID is 166628
Newly created process id or child pid is 166630
8. Viva Questions:
• What is Zombie process in UNIX?
• How do you find Zombie process in UNIX?
• In a file word UNIX is appearing many times? How will you count number
9. References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall,
8th Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System
Concepts, John Wiley &Sons , Inc., 9th Edition, 2016.
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd
Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd
Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
41
Operating System
Experiment No.: 5
42
Experiment No. 5
Aim: Write a program to implement non-pre-emptive and Pre-emptive scheduling algorithms
and demonstrate using CPU OS simulator.
4. Theory:
CPU scheduling is the task of selecting a waiting process from the ready queue and allocating
the CPU to it. The CPU is allocated to the selected process by the dispatcher (It is the module
that gives control of the CPU to the processes by short-term scheduler). Scheduling is a
fundamental operating system function.
In a single processor system, only one process can run at a time; any other process must wait
until the CPU is free and can be rescheduled. The objective of multiprogramming is to have
some process running at all times, to maximize CPU utilization.
CPU scheduling decisions may take place under the following four circumstances:
• When a process switches from the running state to the waiting state
• When a process switches from the running state to the ready state.
• When a process switches from the waiting state to the ready state.
• When a process terminates.
Depending on the above circumstances the two types of scheduling are:
• Non-Preemptive
• Preemptive
Non-Preemptive: Under this scheduling, once the CPU has been allocated to a process, the
process keeps the CPU until it releases the CPU either by terminating or by switching to the
waiting state.
Preemptive: Under this scheduling, once the CPU has been allocated to a process, the
process does not keep the CPU but can be utilized by some other process. This incurs a cost
associated with access to shared data. It also affects the design of the operating system kernel.
Scheduling Criteria:
1. CPU utilization: It can range from 0-100%.In a real system, it ranges should range from 40-
90%.
2. Throughput: Number of processes that are completed per unit time.
3. Turnaround time: How long a process takes to execute. It is the sum of the periods spent
waiting to get into memory, waiting in the ready queue, executing on the CPU, and doing I/O
4. Waiting time: It is the sum of the periods spent waiting in the ready queue.5. Response
time: Time from the submission of a request until the first response is produced.
43
It is desirable to maximize CPU utilization and Throughput and minimize Turnaround time,
waiting time and Response time.
Scheduling Algorithms:
• FCFS (First-Come, First-Served):
o It is the simplest algorithm and NON-PREEMPTIVE.
o The process that requests the CPU first is allocated the CPU first.
o The implementation is easily managed by queue. When a process enters the
ready queue, its PCB is linked onto the tail of the queue. When the CPU is
free, it is allocated to the process at the head of the queue
o The average waiting time, however, is long. It is not minimal and may vary
substantially if the process’s CPU burst time varies greatly.
o This algorithm is particularly troublesome for time-sharing systems.
• PRIORITY SCHEDULING:
o The SJF is a special case of priority scheduling.
o In priority scheduling algorithm, a priority is associated with each process,
and the CPU is allocated to the process with the highest priority.
o It can be either PREEMPTIVE or NON-PREEMPTIVE
o A major problem with priority scheduling algorithms is indefinite blocking,
or starvation.
o A solution to starvation is AGING. It is a technique of gradually increasing
the priority of process that wait in the system for long time.
5. Algorithm:
FCFS Scheduling
1. Start
2. Accept no. of processes from user.
3. Accept burst time of each process i.e BT[i].
4. Initialize waiting time of P1=0 i.e. (WT[1])=0.
5. For(i=2;i<=n;i++)
6. WT[i]=WT[i-1]+BT[i-1]
7. End of for loop
44
8. Calculate average waiting time= (Total Waiting Time) / No. of Processes
9. End
Priority Scheduling
1. Start
2. Accept no. of processes from user.
3. Accept burst time and priority of each process i.e BT[i].
4. Sort the processes and burst time according to ascending order of priority.
5. Initialize waiting time of first process = 0 i.e. (WT[1])=0.
6. For(i=2;i<=n;i++)
7. WT[i]=WT[i-1]+BT[i-1]
8. End of for loop
9. Calculate average waiting time= (Total Waiting Time) / No. of Processes
10. End
CPU-
OS simulator:The OS simulator is designed to support two main aspects of a computer system’s r
esource management: process management and memory management. Image 3 shows the main us
er interface for this simulator. Once a compiled code is loaded in CPU memory, its image is also a
vailable to the OS simulator. It is then possible to create multiple instances of the program images
as separate processes. The OS simulator displays the running processes, the ready processes and t
he waiting processes. Each process is assigned a separate process control block (PCB) which cont
ains information on process state. This information is displayed in a separate window. The memor
y display demonstrates the dynamic nature of page allocations according to the currently selected
placement policy. The OS maintains a separate page table for each process which can
also be observedThe simulator demonstrates how data memory is relocated and the
page tables are modified as the pages are moved in and out of the main memory illustrating virtua
l memory activity.
The process scheduler includes various selectable scheduling policies which includes priority
based, pre‐emptive and round robin scheduling with variable time quantum.
1. Algorithm:
Step 1: Entering source code into the compiler and compiling the code to an
executable program.
Step 2: Loading the program into the CPU simulator’s memory
Step 3: Create Processes from Programs in the OS Simulator
Step 4: Select different scheduling policies and run the processes in the OS simulator.
Observe the differences between Pre-emptive and Non-Pre-emptive scheduling
Step 5: Locate the CPU register values in a process’s PCB when it is in the ready
queue. Explain how the CPU register values in PCB are used in Round Robin
scheduling.
45
6. Conclusion and Discussion:
• There are different types of scheduling algorithms. Depending upon the average waiting time
and turnaround time, above stated scheduling algorithms are compared.
• INPUT: Accept no. of processes, burst time and priority of each process from user.
• OUPUT: Display waiting time of each process and average waiting time of CPU.
• From results, we can conclude that SJF always results into a lowest AWT.
• The OS simulator is able to carry out context‐switching which can be visually enhanced by
slowing down or suspending the progress at some key stage to enable to study the
states of CPU registers, stack, cache, pipeline and the PCB contents.
7. Viva Questions:
• What is process?
• Which module gives control of the CPU to the process selected by the short-term scheduler?
• What are short, long and medium-term scheduling?
• What are the different Process States?
• What is preemptive multitasking?
8. References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall, 8th
Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System Concepts, John
Wiley &Sons , Inc., 9th Edition, 2016.
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
46
Operating System
Experiment No.: 6
47
Experiment No. 6
Aim: -Write a C program to implement solution of Producer consumer problem through Semaphore
4. Theory:
The producer consumer problem is a synchronization problem. We have a buffer of fixed
size. A producer can produce an item and can place in the buffer. A consumer can pick items
and can consume them. We need to ensure that when a producer is placing an item in the
buffer, then at the same time consumer should not consume any item. In this problem, buffer
is the critical section.To solve this problem, we need two counting semaphores – Full and
Empty. “Full” keeps track of number of items in the buffer at any given time and “Empty”
keeps track of number of unoccupied slots.
Semaphore : A semaphore S is an integer variable that can be accessed only through two
standard operations :
wait() - The wait() operation reduces the value of semaphore by 1
signal() - The signal() operation increases its value by 1.
wait(S){
while(S<=0); // busy waiting
S--;
}
signal(S){
S++;
}
Initialization of semaphores
mutex = 1
Full = 0 // Initially, all slots are empty. Thus full slots are 0
Empty = n // All slots are empty initially
Solution for Producer
48
do{
//produce an item
wait(empty);
wait(mutex);
//place in buffer
signal(mutex);
signal(full);
}while(true)
When producer produces an item then the value of “empty” is reduced by 1 because one slot
will be filled now. The value of mutex is also reduced to prevent consumer to access the
buffer. Now, the producer has placed the item and thus the value of “full” is increased by 1.
The value of mutex is also increased by 1 because the task of producer has been completed
and consumer can access the buffer.
Solution for Consumer
do{
wait(full);
wait(mutex);
// remove item from buffer
signal(mutex);
signal(empty);
// consumes item
}while(true)
As the consumer is removing an item from buffer, therefore the value of “full” is reduced by
1 and the value is mutex is also reduced so that the producer cannot access the buffer at this
moment. Now, the consumer has consumed the item, thus increasing the value of “empty” by
1. The value of mutex is also increased so that producer can access the buffer now.
Program:
#include<stdio.h>
#include<stdlib.h>
int mutex=1,full=0,empty=3,x=0;
int main()
{
int n;
void producer();
void consumer();
int wait(int);
int signal(int);
printf("\n1.Producer\n2.Consumer\n3.Exit");
while(1)
{
printf("\nEnter your choice:");
scanf("%d",&n);
switch(n)
{
case 1: if((mutex==1)&&(empty!=0))
producer();
else
printf("Buffer is full!!");
49
break;
case 2: if((mutex==1)&&(full!=0))
consumer();
else
printf("Buffer is empty!!");
break;
case 3:
exit(0);
break;
}
}
return 0;
}
int wait(int s)
{
return (--s);
}
int signal(int s)
{
return(++s);
}
void producer()
{
mutex=wait(mutex);
full=signal(full);
empty=wait(empty);
x++;
printf("\nProducer produces the item %d",x);
mutex=signal(mutex);
}
void consumer()
{
mutex=wait(mutex);
full=wait(full);
empty=signal(empty);
printf("\nConsumer consumes item %d",x);
x--;
mutex=signal(mutex);
}
50
• What is race condition ?
• What is multi-threading ? write advantages of multi-threading
References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall, 8th
Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System Concepts, John
Wiley &Sons , Inc., 9th Edition, 2016.
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
51
Experiment No. 7
52
Experiment No. 7
1. Aim: Write a program to demonstrate the concept of deadlock avoidance through Banker’s
Algorithm.
5. Theory:
An approach to solving the deadlock problem that differs subtly from deadlock prevention is deadlock
avoidance. In deadlock prevention, we constrain resource requests to prevent at least one of the four
conditions of deadlock. This is either done indirectly, by preventing one of the three necessary policy
conditions (mutual exclusion, hold and wait, no pre-emption), or directly by preventing circular wait.
This leads to inefficient use of resources and inefficient execution of processes. Deadlock avoidance,
on the other hand, allows the three necessary conditions but makes judicious choices to assure that the
deadlock point is never reached. As such, avoidance allows more concurrency than prevention. With
deadlock avoidance, a decision is made dynamically whether the current resource allocation request
will, if granted, potentially lead to a deadlock. Deadlock avoidance thus requires knowledge of future
process resource requests.
We describe two approaches to deadlock avoidance:
➢ Do not start a process if its demands might lead to deadlock.
➢ Do not grant an incremental resource request to a process if this allocation might lead to
deadlock.
53
The matrix Claim gives the maximum requirement of each process for each resource, with one row
dedicated to each process. This information must be declared in advance by a process for deadlock
avoidance to work. Similarly, the matrix Allocation gives the current allocation to each process. The
following relationships hold:
With these quantities defined, we can define a deadlock avoidance policy that refuses to start a new
process if its resource requirements might lead to deadlock. Start a new process Pn+1 only if
That is, a process is only started if the maximum claim of all current processes plus those of the new
process can be met. This strategy is hardly optimal, because it assumes the worst: that all processes
will make their maximum claims together.
The strategy of resource allocation denial, referred to as the banker’s algorithm, was first proposed by
Edsger Dijkstra. Let us begin by defining the concepts of state and safe state. Consider a system with
a fixed number of processes and a fixed number of resources. At any time a process may have zero or
more resources allocated to it. The state of the system reflects the current allocation of resources to
processes. Thus, the state consists of the two vectors, Resource and Available, and the two matrices,
Claim and Allocation, defined earlier. A safe state is one in which there is at least one sequence of
resource allocations to processes that does not result in a deadlock (i.e., all of the processes can be run
to completion). An unsafe state is, of course, a state that is not safe.
54
ALGORITHM:
Safety algorithm:
1. Let Work and Finish be vectors of length m and n, respectively. Initialize Work=Available
and Finish[i]=false for i=0,1,…….,n-1.
2. Find an I such that both
a. Finish[i]==false
b. Needi<=Work
3. Work=Work+Allocationi
Finish[i]=true
Go to step 2.
4. If Finish[i]==true for all i, then the system is in a safe state.
Resource-Request Algorithm:
Let Request[i] be the request vector for process Pi. If Requesti [j]==k, then process Pi wants k
instances of resource type Rj. When a request for resources is made by process Pi , the following
actions are taken:
1. If Requesti<=Needi, go to step 2. Otherwise raise an error condition, since the process has
exceeded its maximum claim.
2. If Requesti<=Available, go to step 3. Otherwise, Pi must wait, since the resources are not
available.
3. Have the system pretend to have allocated the requested resources to process Pi by modifying
the state as follows:
Available= Available + Requesti;
Allocationi= Needi – Requesti;
Needi= Needi -Requesti
Input of the algorithm should Accept No. of processes and need of each resource type for each
process from user. Here we accept the processes according to sequence it is to be executed. Output of
the algorithm should Display whether given sequence is safe or unsafe.
7. Viva Questions:
• What is deadlock?
• What necessary conditions can lead to a deadlock situation in a system?
• What is Concurrency? Explain with example Deadlock and Starvation.
55
• What are your solution strategies for “Dining Philosophers Problem”?
• What is Bankers Algorithm?
8. References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall,
8th Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System
Concepts, John Wiley &Sons , Inc., 9th Edition, 2016.
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd
Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd
Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
56
Operating System
Experiment No.: 08
57
Experiment No. 8
1. Aim:Write a program to implement dynamic partitioning placement algorithms i.e Best Fit,
FirstFit, Worst-Fit etc
5. Theory:
Memory compaction is time consuming; the operating system designer must be clever in deciding
how to assign processes to memory (how to plug the holes). When it is time to load or swap a process
into main memory, and if there is more than one free block of memory of sufficient size, then the
operating system must decide which free block to allocate.
Four placement algorithms that might be considered are best-fit, first-fit, worst-fit and next-fit. All are
limited to choosing among free blocks of main memory that are equal to or larger than the process to
be brought in. Best-fit chooses the block that is closest in size to the request. First-fit begins to scan
memory from the beginning and chooses the first available block that is large enough. Next-fit begins
to scan memory from the location of the last placement, and chooses the next available block that is
large enough. Worst-fit chooses largest empty block of all. Figure (a) below shows an example
memory configuration after a number of placement and swapping-out operations. The last block that
was used was a 22-Mbyte block from which a 14-Mbyte partition was created. Best-fit will search the
entire list of available blocks and make use of the 18-Mbyte block, leaving a 2-Mbyte fragment. First-
fit results in a 6-Mbyte fragment, and next-fit results in a 20-Mbyte fragment. Which of these
approaches is best will depend on the exact sequence of process swapping that occurs and the size of
those processes.
The first-fit algorithm is not only the simplest but usually the best and fastest as well. The next-fit
algorithm tends to produce slightly worse results than the first-fit. The next-fit algorithm will more
frequently lead to an allocation from a free block at the end of memory. The result is that the largest
block of free memory, which usually appears at the end of the memory space, is quickly broken up
into small fragments. Thus, compaction may be required more frequently with
next-fit. On the other hand, the first-fit algorithm may litter the front end with small free partitions
that need to be searched over on each subsequent first-fit pass. The best-fit algorithm,
despite its name, is usually the worst performer. Because this algorithm looks for the smallest block
that will satisfy the requirement, it guarantees that the fragment left behind is as small as possible.
Although each memory request always wastes the smallest amount of memory, the result is that main
memory is quickly littered by blocks too small to satisfy memory allocation requests. Thus, memory
compaction must be done more frequently than with the other algorithms.
6. Algorithm:
58
First Fit Algorithm
1. Start
2. Accept no. of partition(n) and size of each partition(S[i]) and no. of processes(P) and size
of each process(SP[i]) from user.
3. Declare i, j, flag[10]
4. for(i=0;i<n;i++)
5. Initialize flag[i]=0
6. End of for loop
7. for(i=0; i<n; i++)
8. for(j=0;j<p;j++)
9. if( (s[i]>=sp[j]) && (flag[j]==0) ) then
flag[j]=1;
printf("\nP%d",j);
printf(" %d\t\t%d",sp[j],s[i]);
break;
10. End of if
11. End of for loop
12. End of for loop
13. End
59
4. for(i=0;i<n;i++)
5. for(j=i+1;j<n;j++)
6. if(s[i]<=s[j]) then
temp=s[i];
s[i]=s[j];
s[j]=temp
7. End of if
8. End of for
9. End of for
10. End
8. Viva Questions:
• What is Virtual Memory? How is it implemented?
• How does swapping result in better memory management?
• What is thrashing?
• Explain Memory allocation method.
9. References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall,
8th Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System
Concepts, John Wiley &Sons , Inc., 9th Edition, 2016.
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd
Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd
Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
60
Operating System
Experiment No.: 9
61
Experiment No. 9
1. Aim:Write a program to implement various page replacement policies.
5. Theory:
Regardless of the resident set management strategy, there are certain basic algorithms that are used for
the selection of a page to replace in main memory. General page replacement algorithms
include-
• Optimal
• Least recently used (LRU)
• First-in-first-out (FIFO)
The optimal policy:
It selects for replacement that page for which the time to the next reference is the longest. It can be
shown that this policy results in the fewest number of page faults. Clearly, this policy is impossible to
implement, because it would require the operating system to have perfect knowledge of future events.
However, it does serve as a standard against which to judge real world algorithms. Figure below gives
an example of the optimal policy. The example assumes a
fixed frame allocation (fixed resident set size) for this process of three frames. The execution of
the process requires reference to five distinct pages. The page address stream formed by
executing the program is-
232152453252
which means that the first page referenced is 2, the second page referenced is 3, and so on. The
optimal policy produces three page faults after the frame allocation has been filled.
6. Algorithm:
Optimal Algorithm
63
1. Start
2. Declare the required variables and initialize it.
3. Get the frame size and reference string from the user
4. Accommodate a new element look for the element that is not likely to be used in
future replace.
5. Count the number of page fault and display the value
6. Stop
8. Viva Questions:
• What is the best page size when designing an operating system?
• What DAT refers to in memory management by an operating system supporting
virtual memory ?
• Which of the following page replacement algorithms suffers from Belady’s Anomaly?
• A process refers to 5 pages, A, B, C, D, E in the order : A, B, C, D, A, B, E, A, B, C,
D, E. If the page replacement algorithm is FIFO, the number of page transfers with an
empty internal store of 3 frames is
• A memory page containing a heavily used variable that was initialized very early and
is in constant use is removed, then the page replacement algorithm
9. References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall,
8th Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System
Concepts, John Wiley &Sons , Inc., 9th Edition, 2016.
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd
Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd
Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
64
Operating System
Experiment No.: 10
65
Experiment No. 10
1. Aim: Write a program to implement any two Disk scheduling algorithms like FCFS, SSTF,
SCAN etc.
2. Objectives: From this experiment, the student will be able
• To get the concepts of Storage Management, Disk Management and disk scheduling
5. Theory:
A hard disk drive is a collection of plates called platters. The surface of each platter is divided
into circular tracks. Furthermore, each track is divided into smaller pieces called sectors. Disk I/O
is done sector by sector. A group of tracks that are positioned on top of each other form a
cylinder. There is a head connected to an arm for each surface, which handles all I/O operations.
For each I/O request, first head is selected. It is then moved over the destination track. The disk is
then rotated to position the desired sector under the head= and finally, the read/write operation is
performed.
There are two objectives for any disk scheduling algorithm:
1. Maximize the throughput - the average number of requests satisfied per time unit.
2. Minimize the response time - the average time that a request must wait before it is satisfied.
Some of the disk scheduling algorithms are explained below.
66
o variant: service requests from inside to outside, and then skip back to the
innermost cylinder.
• C-LOOK
o moves inwards servicing requests until there are no more requests in that
direction, then it jumps to the outermost outstanding requests.
o repeast this over and over.
o variant: service requests from inside to outside, then skip back to the innermost
request.
6. Algorithm:
Step 1: Start
Step 2: Read the number of processes and the requested tracks.
Step 3: In FCFS, the processes are scheduled according to the order in which they
arrive.
Step 4: In SSTF, the next process to be scheduled is selected as the one requiring
the minimum seek time from the current position of disk head.
Step 5: In SCAN, the processes are scheduled from track 0 to highest numbered
track. After reaching highest numbered track, it schedules the processes from there to track 0
and so on.
Step 6: Circular SCAN always schedules the processes from track 0 to the highest
numbered track.
Step 7: Stop.
8. Viva Questions:
• What data structure for a sector typically contain?
• What is the terminology used for the Defective sectors on disks?
• What happen if a process needs I/O to or from a disk, and if the drive or controller
is busy?
• What is the terminology used for the time taken to move the disk arm to the
desired cylinder?
9. References:
• William Stallings, Operating System: Internals and Design Principles, Prentice Hall,
8th Edition, 2014
• Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, Operating System
Concepts, John Wiley &Sons , Inc., 9th Edition, 2016.
• Andrew Tannenbaum, Operating System Design and Implementation, Pearson, 3rd
Edition.
• D.M Dhamdhere, Operating Systems: A Concept Based Approach, Mc-Graw Hill
• Maurice J. Bach, “Design of UNIX Operating System”, PHI
• Achyut Godbole and Atul Kahate, Operating Systems, Mc Graw Hill Education, 3rd
Edition
• The Linux Kernel Book, Remy Card, Eric Dumas, Frank Mevel, Wiley Publications.
67