Sei sulla pagina 1di 45

Module Code & Module Title

CS5001 Networks and Operating Systems

Assessment Weightage & Type


20% Individual Coursework

Year and Semester


2018-19 Autumn

Student Name: Renish Gautam


London Met ID: 17031035
College ID: NP01CP4A170052
Assignment Due Date: Week 20
Assignment Submission Date: Week 26

I confirm that I understand my coursework needs to be submitted online via Google Classroom
under the relevant module page before the deadline in order for my assignment to be accepted
and marked. I am fully aware that late submissions will be treated as non-submission and a
marks of zero will be awarded.
Table of Contents

Acknowledgement .......................................................................................................................... 1

Abstract ........................................................................................................................................... 2

Task A ............................................................................................................................................. 3

Introduction ................................................................................................................................. 3

Aims & Objectives ...................................................................................................................... 3

Script ........................................................................................................................................... 4

Content of Files ......................................................................................................................... 10

Testing: ...................................................................................................................................... 11

A. Valid Testing .............................................................................................................. 11

Conclusion................................................................................................................................. 28

Task B ........................................................................................................................................... 29

Introduction ............................................................................................................................... 29

Aims and Objectives ................................................................................................................. 30

Body of Report .......................................................................................................................... 31

I/O Structure .......................................................................................................................... 31

I/O Application Interface ....................................................................................................... 31

Kernel I/O subsystem ............................................................................................................ 32

I/O Scheduler ......................................................................................................................... 33


I/O Device Handler ................................................................................................................ 34

Direct Memory Access .......................................................................................................... 34

Conclusion .................................................................................................................................... 35

References ..................................................................................................................................... 36

Appendix ....................................................................................................................................... 38
Table of Figures

Figure 1: Result after assigning parameters while running a program ......................................... 11

Figure 2 : Result after assigning valid secret key ......................................................................... 12

Figure 3: Result after assigning the correct winning team. .......................................................... 13

Figure 4 Result after entering three code of the players ............................................................... 14

Figure 5 Test result after entering a number of a chosen code from the list of players. ............... 15

Figure 6 Result after repeating loop.............................................................................................. 16

Figure 7 Result after terminating the program .............................................................................. 17

Figure 8 Result after entering name and id through parameter of program .................................. 18

Figure 9 Result for entering the wrong code name and selecting that option............................... 19

Figure 10 Result after entering the invalid secret key three times. ............................................... 20

Figure 11 Result after entering not the best team ......................................................................... 21

Figure 12: Result after entering not the best team ........................................................................ 22

Figure 13:result after entering select out option value.................................................................. 23

Figure 14 Result after entering invalid country code.................................................................... 24

Figure 15 Result after entering invalid player code ...................................................................... 25

Figure 16 Result after entering same code twice .......................................................................... 26

Figure 17: Result after entering player code more than 3 times .................................................. 27
Table of Tables

Table 1: Test 1 .............................................................................................................................. 11

Table 2: Test 2 .............................................................................................................................. 12

Table 3 : : Test 3 .......................................................................................................................... 13

Table 4 Test 4................................................................................................................................ 14

Table 5: Test 5 .............................................................................................................................. 15

Table 6 Test 6................................................................................................................................ 16

Table 7 :Test 7 .............................................................................................................................. 17

Table 8 Test 8............................................................................................................................... 18

Table 9 Test 9................................................................................................................................ 19

Table 10: Test 10 .......................................................................................................................... 20

Table 11 Test 11............................................................................................................................ 21

Table 12 Test 12............................................................................................................................ 23

Table 13 Test 13............................................................................................................................ 24

Table 14: Test 14 .......................................................................................................................... 25

Table 15 Test 15............................................................................................................................ 26

Table 16: Test 16 .......................................................................................................................... 27


Networks and Operating System| CS5001NI

Acknowledgement

It is my proud privilege to express a pleasure to remind the fine individuals in the Islington College
for their sincere supervision. I acknowledged to uphold my theoretical as well as practical skills in
the lecture, tutorial and workshop session.

First of all, I would like to express my special thanks of gratefulness to our module leader Mr.
Dipeshor Silwal for providing timely guidance and clear vision about the topics related to the
Network and operating system.

Secondly, I would like to express my deepest thanks to our tutor Mr. Suryansh Mathema for
providing invaluable guidance and encouragement throughout the semester. He has been very
helpful in dealing with the queries of this module along with the coursework.

I’m very thankful to all the faculties’ member of Islington College for co-ordination and
cooperation and for their kind supervision along with inspiration.

Lastly, I would like to thank my friends and seniors who helped me in concluding the project
within the limited time frame.

Renish Gautam 17031035


1|Page
Networks and Operating System| CS5001NI

Abstract

This coursework consists of two portions Task A and Task B. Task A part of the coursework
requires us to develop a script in the environment of UNIX shell. Completion of this ask requires
us to construct an interactive request, check for user input errors, diagnosis of the errors with clear
messages and testing of the script. As for Task B part of the coursework we are to write a technical
report on UNIX as a network operating system. This report is to be based on the research form
books, journals, industry white papers, websites and textbooks.

Renish Gautam 17031035


2|Page
Networks and Operating System| CS5001NI

Task A
Introduction

UNIX has a special utility known as shell which interprets all the commands from the terminal
and runs the requested program by the user. This coursework requires to develop a small script
program in a UNIX shell environment. Task A of the coursework requires to create and script and
also perform a black box testing for valid and invalid inputs. Task A also requires the content of
the three files which is used by script program for reading the contents from them.

Aims & Objectives

Aims

• To develop a script that implements interaction with the UNIX environment in a friendly
manner and executes simple input/output operations.
• To construct an interactive request by using UNIX commands.
• To check user inputs for errors and diagnosing these errors with clear messages.
• To test the script for valid and invalid inputs.

Objectives
• By writing a program using different UNIX shell command.
• By researching about the different interactive commands and implementing it in the script
program and making good use of if, while, select, read, case, until commands.
• By using different utilities like echo and cat to display messages and read files
respectively.
• By using black box testing to carry out testing for each valid and invalid input testing.

Renish Gautam 17031035


3|Page
Networks and Operating System| CS5001NI

Script
#!/bin/bash

#The following set of commands asks for input from user


name=$1 #this stores the first parameter
ID=$2 #this stores second parameter
#list of variables that are utilized below
abc=null
def=null
code=007
var=1
ghi=false
jkl=true
mno=true

array="KAG MES REU LOR COU"


#This function asks to enter the secret key
try(){
if [ $1 -lt 4 ]
then
echo "Enter secret key: "
read key

if [ -z "$key" ] || [ $key != $code ]


#Checking if secret key is not equal to key.
then
try $(($1 + 1))
else
var=$code
fi
else
echo "Sorry you have entered maximum number of invalid key."
ghi=true
fi
}

hello(){
echo "Welcome $name"
echo "ID number: $ID"
echo "Current date and time: "$(date)
}
#This function displays the country name and code and then asks to enter best
team
view1(){
echo "Country: || Code:
"
echo "Japan || JPN

Argentina || ARG

Renish Gautam 17031035


4|Page
Networks and Operating System| CS5001NI

Germany || GER

France || FRA

Brazil || BRA
"
}
ask1(){
echo "List of countries:
"
view1
echo ""
printf "Select a country: "
read country
abc=$country
if [ -z "$abc" ]
then
echo ""
echo " Please insert the name of the country
"
ask1 #using of recursive function
fi
}

userselect() {
echo " "
ask1
echo " "

if [ $abc == "FRA" ]
then
ans=false

fi

if [ $ans == true ]
then
echo "You have entered Invalid Option"
userselect
fi

}
#This function displays the players and the player codes
view(){
echo "Player: || Code:
"
echo "Messi || MES

Kagawa || KAG

Coutinio || COU

Renish Gautam 17031035


5|Page
Networks and Operating System| CS5001NI

LLoris || LOR

Reus || REU
"
}
#This function displays the players and code and asks to enter any three
bestplayers(){
p=1
echo "List of players:
"
view
echo ""
printf "Select any three player : "
read players
if [ -z "$players" ]
then
echo ""
echo "Please insert the players.
"
bestplayers
else
check2 $players

fi

}
#It checks wheather the data are entered three times or not
check2(){
len=$(echo "$players" | wc -w)
echo ""
if [ $len -gt 3 ] || [ $len -lt 3 ]
then
echo "Only three players are allowed
"
bestplayers
else
loop $players
if [ $p -lt 4 ]
then
echo "Insert the validated data on the list.
"
bestplayers
else
ch $players
fi
fi
}
#It checks wheather the same data is entered or not
ch(){
str1=`echo $players | cut -d" " -f 1`
str2=`echo $players | cut -d" " -f 2`
str3=`echo $players | cut -d" " -f 3`
echo $str1 $str2 $str3

Renish Gautam 17031035


6|Page
Networks and Operating System| CS5001NI

if [ $str1 == $str2 ] || [ $str2 == $str3 ] || [ $str1 == $str3 ]


then
echo "Same data is entered.
"
bestplayers
else
echo " "
re $players
fi
}

re(){
echo "Select a player :
"
j=1
for i in $players
do
echo $j "." $i
j=`expr $j + 1`
done
echo ""
read1
}

loop(){
for i in $players
do
for j in $array
do
if [ $i == $j ]
then
p=$((p + 1))
fi
done
done

#This function display the name and code of the players and asks to select
the best
read1(){
echo "Select the best player: "
select plays in $str1 $str2 $str3
do
case $plays in
"MES")
cat cw3/MES
echo ""
break
;;
"REU")
cat cw3/REU
echo ""

Renish Gautam 17031035


7|Page
Networks and Operating System| CS5001NI

break
;;
"COU")
cat cw3/COU
echo ""
break
;;
"LOR" | "KAG")
echo "The file of this player is not found. Choose again"
;;
*)
echo "Choose again"
;;
esac
done

}
#It checks wheather the calue is chosen coreect or not
incorrect(){
ans=true
userselect $ans
if [ $ans == false ]
then
if [ $abc == "FRA" ]
then
echo "Correct country is chosen.
"
cat cw3/country
echo ""
bestplayers
else
echo "Wrong team entered. Try again"
incorrect
fi
fi
}
check(){
if [ $jkl == true ]
then
try 1
fi
if [ $var == $code ]
then
if [ $jkl == true ]
then
echo ""
hello $a $b

fi
incorrect
fi
}
#This function asks if the program wants to be repeated

Renish Gautam 17031035


8|Page
Networks and Operating System| CS5001NI

main(){
until [ $mno == false ]
do
check
if [ $ghi == false ]
then
echo "Do you want to repeat the program again?"
read more
jkl=false
if [ $more != "yes" ]
then
echo "Thank you for using this program !!!"
break;
fi
else
break;
fi
done
}
main

Renish Gautam 17031035


9|Page
Networks and Operating System| CS5001NI

Content of Files

• MES
Lionel Andrés Messi is an Argentine professional footballer who plays as a forward and
captains both Spanish club Barcelona and the Argentina national team.
Messi has won a record-tying five Ballon d'Or awards, four of which he won consecutively,
and a record five European Golden Shoes.

• COU
Philippe Coutinho Correia (born: 12 June 1992) is a Brazilian professional footballer who
plays as an attacking midfielder or winger for the Spanish club Barcelona and the Brazilian
national team.
In January 2018, Coutinho transferred to Barcelona in a record transaction fee reportedly
worth €142 million ($170 million), which would make him the world's third most
expensive player at that time.

• REU
Marco Reus (born 31 May 1989) is a German professional footballer who plays in the
forward position for the Germany national team and Borussia Dortmund.
He is the also the captain of Borussia Dortmund. With Dortmund, Reus won the DFL-
Supercup in 2013 and the DFB-Pokal in 2017, and has scored over 100 goals for the club.
With the Germany national team, Reus has only 37 caps, due to his recurring injuries in
recent years.

Renish Gautam 17031035


10 | P a g e
Networks and Operating System| CS5001NI

Testing:
A. Valid Testing
1. Test 1
Test 1
Input Input a valid parameter.
Expected result Parameter will be assigned and the program ask for the secret key.
Actual result Parameter was assigned and the program asked user to enter secret key.

Table 1: Test 1

Figure 1: Result after assigning parameters while running a program

Renish Gautam 17031035


11 | P a g e
Networks and Operating System| CS5001NI

2. Test 2

Test Id 2
Input Input Correct key.
Expected Output Program should move to next step
Actual Output Program moved to next step
Table 2: Test 2

Figure 2 : Result after assigning valid secret key

Renish Gautam 17031035


12 | P a g e
Networks and Operating System| CS5001NI

3. Test 3

Test Id 3

Input Input the correct winning team

Expected Output Correct choice should describe about the


winning team and move to further step.

Actual Output The winning team description was displayed


and the program moved forward.
Table 3 : : Test 3

Figure 3: Result after assigning the correct winning team.

Renish Gautam 17031035


13 | P a g e
Networks and Operating System| CS5001NI

4. Test 4
Test Id 4

Input Input three player code

Expected Output A menu to select from three options should be


displayed.

Actual Output The menu to select from three options was


displayed

Table 4 Test 4

Figure 4 Result after entering three code of the players

Renish Gautam 17031035


14 | P a g e
Networks and Operating System| CS5001NI

5. Test 5
Test Id 5
Input a number of a chosen code from the list
Input
of players.
Expected Output Program will display the description of the
player that is selected by the user.

Actual Output Program displayed the description of the


player that was selected by the user.

Table 5: Test 5

Figure 5 Test result after entering a number of a chosen code from the list of players.

Renish Gautam 17031035


15 | P a g e
Networks and Operating System| CS5001NI

6. Test 6

Test Id 6

Input Input yes keyword.

Expected Output Program will repeat the loop and ask the user
to guess the best country team.

Actual Output Program repeated loop and asked user to guess


the best country team.

Table 6 Test 6

Figure 6 Result after repeating loop.

Renish Gautam 17031035


16 | P a g e
Networks and Operating System| CS5001NI

7. Test 7

Test Id 7

Input Input no keyword

Expected Output The program should terminate.

Actual Output The program terminated.

Table 7 :Test 7

Figure 7 Result after terminating the program

Renish Gautam 17031035


17 | P a g e
Networks and Operating System| CS5001NI

8. Test 8

Test Id 8

Input Input first name and id through parameter of


the program.

Expected Output First name and id should be displayed along


with current date and time.

Actual Output First name and id was displayed along with


current date and time.
Table 8 Test 8

Figure 8 Result after entering name and id through parameter of program

Renish Gautam 17031035


18 | P a g e
Networks and Operating System| CS5001NI

9. Test 9

Test Id 9

Input Enter wrong code name and selecting that


option.

Expected Output A message should be displayed informing user


about unavailability of the file.

Actual Output A message was be displayed informing user


about unavailability of the file.

Table 9 Test 9

Figure 9 Result for entering the wrong code name and selecting that option.

Renish Gautam 17031035


19 | P a g e
Networks and Operating System| CS5001NI

10. Test 10
Test Id 10

Input Input wrong secret key

Expected Output The program should give a total of three


chances to enter correct secret key and after 3
consecutive try’s the program displays an error
message and should terminate.

Actual Output The program displayed error message asking


user to enter correct secret key after 3
consecutive try’s and then the program
terminated.

Table 10: Test 10

Figure 10 Result after entering the invalid secret key three times.

Renish Gautam 17031035


20 | P a g e
Networks and Operating System| CS5001NI

11. Test 11

Test Id 9

Input Input wrong team.

Expected Output The program should keep on displaying error


message until correct team is entered.

Actual Output The program displayed error message until


correct team was entered.

Table 11 Test 11

Figure 11 Result after entering not the best team

Renish Gautam 17031035


21 | P a g e
Networks and Operating System| CS5001NI

Figure 12: Result after entering not the best team

Renish Gautam 17031035


22 | P a g e
Networks and Operating System| CS5001NI

12. Test 12

Test Id 12

Input Select out of option values from menu

Expected Output Should display an error message informing


user to select only available option

Actual Output Error message was displayed

Table 12 Test 12

Figure 13:result after entering select out option value

Renish Gautam 17031035


23 | P a g e
Networks and Operating System| CS5001NI

13. Test 13

Test Id 13
Input invalid country code.
Input

Expected Output A message should be displayed informing user


about unavailability of the file.

Actual Output A message was be displayed informing user


about unavailability of the file.

Table 13 Test 13

Figure 14 Result after entering invalid country code.

Renish Gautam 17031035


24 | P a g e
Networks and Operating System| CS5001NI

14. Test 14

Test 14
Input Input invalid player code.
Expected result Program will inform about the invalid player code ask user to enter the
player code until the correct code are entered.
Actual result Program was informed about the invalid player code and it asked user to
enter the player code until the correct code are entered.
Table 14: Test 14

Figure 15 Result after entering invalid player code

Renish Gautam 17031035


25 | P a g e
Networks and Operating System| CS5001NI

15. Test 15
Test 15
Input Input same player code more than one time.
Expected result Program will inform about the invalid player code ask user to enter the
player code until the correct code are entered.
Actual result Program was informed about the invalid player code and it asked user to
enter the player code until the correct code are entered.
Table 15 Test 15

Figure 16 Result after entering same code twice

Renish Gautam 17031035


26 | P a g e
Networks and Operating System| CS5001NI

16. Test 16

Test 16
Input Input player code more than three time.

Expected result Program will inform about the invalid player code ask user to enter the
player code until the correct code are entered.
Actual result Program was informed about the invalid player code and it asked user to
enter the player code until the correct code are entered.
Table 16: Test 16

Figure 17: Result after entering player code more than 3 times

Renish Gautam 17031035


27 | P a g e
Networks and Operating System| CS5001NI

Conclusion

The task A of this coursework required to make a script using the UNIX shell. Every one of the
requirements of the coursework were satisfied and a script program was created. During the
development process I researched and learnt about a lot of UNIX commands and the bash syntaxes
to create an interactive program. I learnt about if, while, select, read, case, until commands and
also learnt to make good use of the echo and cat utilities. I have also learned to appropriately check
user input errors and diagnosed those errors with clear messages. For the test of the script, black
box testing process was led which helped me discover the errors and check whether the program
is working efficiently or not. Overall task A of this coursework has assisted me to improve my
programming skills in bash shell and complete legitimate testing of the script.

Renish Gautam 17031035


28 | P a g e
Networks and Operating System| CS5001NI

Task B
Introduction

The operating system that manages network resources including special function for connecting
computers and devices into a local area network is known as network operating system. The
network operating system manages multiple request concurrently and provides the security
necessary in a multiuser environment. It can be completely self-contained operating system. Some
of the example are NetWare, UNIX, Windows 2000, or Mac OS X. (University, 2019)

UNIX was developed by Bell Labs under AT and T. It is a powerful server operating system that
can also be used in peer-to-peer or client/server networks. Ii is written in C language. AT and T
released UNIX upon its completion in 1974 to universities. IT was enabled for people to go in and
actually view the source code of the system. It enabled coders to build the basic functions od the
original UNIX operating system. (Notes, 2019)

Renish Gautam 17031035


29 | P a g e
Networks and Operating System| CS5001NI

Aims and Objectives

Aims

• To understand about UNIX operating system.


• To be comfortable with I/O management in UNIX operating system and execute that
information in practical field.
• To research and totally understand composition and structure of I/O management system.
• To gain the idea about various functions of I/O traffics handlers, I/O scheduler and I/O
device handler.

Objectives

• By researching various articles published on different websites about UNIX operating


system and I/O management in UNIX OS.
• By studying various books and e-books on operating system and more specifically
UNIX OS.
• By researching various journals and research papers about I/O management in UNIX
OS.

Renish Gautam 17031035


30 | P a g e
Networks and Operating System| CS5001NI

Body of Report
I/O Structure

I/O units in UNIX has two main groups, block devices and character devices. Additionally, there
are sockets that are utilized for network communication.

Block Devices

• Block devices are usually called via the file system, but are also available as special files
• The devices that addresses blocks of a fixed size, usually disk memories.
• The data blocks are buffered in the buffer cache.
For example, Hard disks, USB cameras, USB pen drive, Disk-On-Key, etc.

Character Devices

• Terminals and printers, yet additionally everything else that don't utilize the block buffer
cache.
• A hardware device is recognized by its sort and a device number.
• Terminals and printers, yet additionally everything else that don't utilize the block buffer
cache.
• Device drivers are called by means of a switch table.
• It has one switch table for block devices and one for character devices.
For example, serial ports, sounds cards, parallel ports, etc.

I/O Application Interface

It represents the structuring techniques and interfaces for the operating system which enables I/O
devices to be treated in a standard, uniform way. The differences are summarized in kernel
modules known as device drivers that are internally custom-tailored to each device but that export
one of the standard interfaces to applications. The motive of the device driver layer is to hide the
variances among device controllers from the I/O subsystem of the kernel. (padakuu.com, 2017)

The characteristics of I/O interfaces with respected to devices are listed below:

• Character-stream / block: A character-stream device transfers the bytes in one by one,


while a block device transfers a complete unit of bytes.

Renish Gautam 17031035


31 | P a g e
Networks and Operating System| CS5001NI

• Sequential / random-access: A sequential device transfers the data in a fixed order


determined by the device, whereas random-access device can instruct to seek position to
any of the available data storage locations.
• Synchronous / asynchronous: A synchronous device makes data transfers with known
response times. Asynchronous device shows irregular or unpredictable response time.
• Sharable / dedicated: A sharable device can be used simultaneously by several processes
or threads but a dedicated device cannot.
• Read-write, read only, or write only: Some devices perform both input and output,
nonetheless others support only one data direction that is read only.
Kernel I/O subsystem

Kernel I/O Subsystem is in control to provide many services related to I/O. Some of the services
provided are listed below:

Scheduling − Kernel lists a set of I/O requests to control a good order in which to execute them.
At the point when the application issues a blocking I/O system call, the request is placed on the
queue for that device. The Kernel I/O scheduler modifies the order of the queue to improve the
overall system efficiency and the normal reaction time experienced by the applications.

Buffering − Kernel I/O Subsystem keeps up a memory area called buffer that stores data while
they are exchanged between two devices or between a device with an application operation.
Buffering is done to cope with speed disparity among the producer and consumer of a data stream
or to adjust between the devices that have dissimilar data transfer sizes.

Caching − Kernel maintains cache memory which is area of fast memory that holds the duplicates
of the data. Access to the cached copy is more is esdew3ffective than access to the first.

Spooling and Device Reservation − Spool is a buffer that holds output for a device, for example,
a printer, that cannot acknowledge interleaved data streams. Spooling system duplicates the
queued spool files to the printer each one in turn.

Error Handling − I/O requests can fall flat for many reasons, either transient or permanent I/O
requests normally return an error bit indicating the problem. Some devices are equipped for giving
significantly more detailed information about errors, and even keep an error log that can be
mentioned by the host.I/O Traffic Controller

It monitors the status of every device, control unit, and channel. Its three main tasks are:

1. Decide whether there's no less than one way accessible.

Renish Gautam 17031035


32 | P a g e
Networks and Operating System| CS5001NI

2. In the event that more than one way, figure out which to choose.

3. If paths are all busy, decide when one will wind up accessible.

As the number of units in the I/O subsystem rises and as the number of paths between these units
increases its job becomes more compound. It maintains a database which contains the status and
connections for each unit in the I/O subsystem, gathered into Channel Control Blocks, Control
Unit Control Blocks, and Device Control Blocks.

It follows in reverse from the controller block of the requested device through the control units to
the channels to select a free path. When no path is available the process is connected to the queues
kept in the control blocks and this consequences in creating multiple wait queues with one queue
per path.

I/O Scheduler

It implements the policies that decides the allocation of devices, control units, and channels and
must choose which requests to satisfy first. When the number of requests is larger than the number
of available paths, the I/O scheduler must decide which request to satisfy first. I/O requests are not
preempted i.e. once the channel program has begun, its’s allowed to continue to conclusion even
though I/O requests with higher priorities may have entered the queue.

Some systems let the I/O scheduler to provide preferential treatment to I/O requests from high
priority programs. In that case, if a process has high priority, then its I/O requests would also have
high priority and would be pleased before other I/O requests with less priorities. The I/O scheduler
must synchronize its work with the traffic controller to make sure that a path is available to fulfill
the chosen I/O requests.

Renish Gautam 17031035


33 | P a g e
Networks and Operating System| CS5001NI

I/O Device Handler

It processes I/O interruptions, handles error conditions and gives detailed scheduling algorithms.
UNIX system sets a global variable so distinct values can indicate the specific error that has
occurred.

A seek strategy for I/O device handler is the prearranged policy that the device handler uses to
allocate access to the device among the many processes that may be waiting for it. Most common
seek strategies are:

a) FCFS
It is the easiest device-scheduling algorithm and jobs are executed in first come, first serve
basis. It is simple to know and implement and implementation is based on FIFO queue.

b) SSTF
It is scheduling algorithm where shortest jobs are processed first and longer jobs are made
to wait.

c) SCAN
It is scheduling algorithm that uses a directional bit to specify whether the arm is moving
toward center of the disk or away.

Direct Memory Access

DMA is a method of transferring data from RAM to another part of the computer without
processing it using CPU whereas most data that is input or output from PC is processed by CPU,
some data don’t require processing, or can be processed by another device.

DMA can save processing time and it is an effective way to transfer data from the computer’s
memory to other devices. For the devices to use DMA, they must be allotted to the DMA channel.
Each sort of port on a PC has a set of DMA channels that can be allotted to each connected device.
The DMA controller is combined into the processor board and manages all DMA data transfers.
Transferring data needs two steps. Data is transferred from sending device to DMA controller and
then to receiving device. Microprocessor gives DMA controller the destination, and amount of
data that is to be moved. Then DMA controller transfers the data, which lets the microprocessor
to continue with other processing tasks. (techterms, 2018)

Renish Gautam 17031035


34 | P a g e
Networks and Operating System| CS5001NI

Conclusion

This report is all about UNIX network operating system. The network operating system manages
network resources including special function for connecting computers and devices into a local
area network. UNIX was developed by Bell Labs under AT and T. It is a powerful server
operating system that can also be used in peer-to-peer or client/server networks. The main task of
the operating system is to handle input and output devices. I/O units in UNIX has two main groups,
block devices and character devices. And the I/O Application Interface represents the structuring
techniques and interfaces for the operating system which enables I/O devices to be treated in a
standard, uniform way.

Renish Gautam 17031035


35 | P a g e
Networks and Operating System| CS5001NI

References

Cesat, D. P. (2000). Understanding the Linux Kernel.

Fisher, T. (2019). Lifewire. Retrieved April 3, 2019, from https://www.lifewire.com/operating-


systems-2625912

guru99. (2019). guru99. Retrieved April 2, 2019, from https://www.guru99.com/introduction-


linux.html

Hope, C. (2018). Computer Hope. Retrieved April 4, 2019, from


https://www.computerhope.com/jargon/i/iodevice.htm

linuxandubuntu. (2018). linuxandubuntu. Retrieved April 2, 2019, from


http://www.linuxandubuntu.com/home/top-10-unix-based-operating-systems

Mauerer, W. (2008). Professional Linux Kernel Architecture. In W. Mauerer.

Notes, C. N. (2019, April 15). Computer Network Notes. Retrieved from Computer Network
Notes: https://www.computernetworkingnotes.com/networking-tutorials/network-
operating-system-features-and-functions.html

padakuu.com. (2017, March 12). Application I/O Interface. Retrieved from padaku:
http://www.padakuu.com/article/128-application-io-interface

Stalling, W. (2005). The history of UNIX operating system. The UNIX operating system, IIII(2),
2.

techopedia. (2019, 2 3). Retrieved from Techopedia:


https://www.techopedia.com/definition/4637/unix

techterms. (2018, april 1). DMA. Retrieved from techterms: https://techterms.com/definition/dma

tutorialspoint. (2018, 8 12). operating system. Retrieved from


https://www.tutorialspoint.com/operating_system/os_io_software.htm

University, I. (2019, April 15). Insiana University. Retrieved from Insiana University:
https://kb.iu.edu/d/ajlq

Renish Gautam 17031035


36 | P a g e
Networks and Operating System| CS5001NI

Renish Gautam 17031035


37 | P a g e
Networks and Operating System| CS5001NI

Appendix

The Unix operating system is a set of programs that act as a link between the computer and the
user. The computer programs that allocate the system resources and coordinate all the details of
the computer's internals is called the operating system or the kernel.

Users communicate with the kernel through a program known as the shell. The shell is a
command line interpreter; it translates commands entered by the user and converts them into a
language that is understood by the kernel.

Unix was originally developed in 1969 by a group of AT&T employees Ken Thompson, Dennis
Ritchie, Douglas McIlroy, and Joe Ossanna at Bell Labs.

There are various Unix variants available in the market. Solaris Unix, AIX, HP Unix and BSD
are a few examples. Linux is also a flavor of Unix which is freely available.

Several people can use a Unix computer at the same time; hence Unix is called a multiuser
system.

A user can also run multiple programs at the same time; hence Unix is a multitasking
environment.

Kernel − The kernel is the heart of the operating system. It interacts with the hardware and most
of the tasks like memory management, task scheduling and file management.

Shell − The shell is the utility that processes your requests. When you type in a command at
your terminal, the shell interprets the command and calls the program that you want. The shell
uses standard syntax for all commands. C Shell, Bourne Shell and Korn Shell are the most
famous shells which are available with most of the Unix variants.

Commands and Utilities − There are various commands and utilities which you can make use of
in your day to day activities. cp, mv, cat and grep, etc. are few examples of commands and
utilities. There are over 250 standard commands plus numerous others provided through 3rd
party software. All the commands come along with various options.

Files and Directories − All the data of Unix is organized into files. All files are then organized
into directories. These directories are further organized into a tree-like structure called the
filesystem TCP stands for transport control protocol. It is a connection oriented and reliable
protocol and is used for transfer of crucial data. On the other hand, UDP stands for User

Renish Gautam 17031035


38 | P a g e
Networks and Operating System| CS5001NI

Datagram Protocol. It is an unreliable and connection-less protocol which is used for services
that require fast transmission of data.

We are living in a world full of various types of networks. The most important network consists
of computers. We send e-mails to our friends, send them our pictures, listen to a distant radio
channel, and many more things. The whole functioning of the network seems to be running
seamlessly on a simple platform. However, behind this simple looking network, lies a complex
system that has been simplified by use of various protocols. Protocols define the rules,
conventions and data structures that govern the data communication.

These protocols are required because a computer network is a heterogeneous mixture of various
components. Computers that are interacting with each other may differ in various attributes like
hardware, software, specifications etc. Thus, a unifying set of rules is a must that should be
followed worldwide, in order to communicate the data between various types of computer
systems. We can simply say that it is a language that computers use to talk to each other.

Block Buffer Cache

• The goal for the block buffer cache is to reduce the number of read and write
operations to the disk memory
• If the same data are read several times within a short period of time, only one disk
access is needed.
• It often happens that written data are erased within a short period of time. For example
temporary files produced by a compiler. These data may never need to be written to
the disk if the cache uses long enough delay.
• However, using a long delay in writing imposes a risk. If the system crashes - all data
that is not written to disk is lost.

I/O Hardware

Many different types of I/O devices Two different types of connections:

• point-to-point
• bus In a typical PC

A controller is an electronic chip or circuit board used to operate a device.

Renish Gautam 17031035


39 | P a g e
Networks and Operating System| CS5001NI

Computers use two different methods to communicate with controllers:

• Special I/O instructions


• Memory mapped registers
• Some systems, for example the PC, uses both methods.

I/O Hardware - Polling

Read device register to determine state of device.

If the device is not ready:

• Use a busy-wait loop to wait for the device. Usually ok for writing to fast devices that
give short wait times.

Not good for reading because the waiting may be forever if no data arrives.

I/O Hardware - Interrupts

• A controller signals the CPU that it needs attention by generating an interrupt.


• An interrupt vector is usually used to direct the interrupt to the correct handler
routine.
• There exist several interrupt request lines to request interrupts at different priority.
• The interrupt mechanism is also used to handle exceptions.

Renish Gautam 17031035


40 | P a g e

Potrebbero piacerti anche