Sei sulla pagina 1di 5

Operating Systems Lecture Notes

Week 1 – Introduction to OS

Polytechnic University of the Philippines


Sta. Mesa, Manila

COMP 20103 – OPERATING SYSTEMS


Week 1 – Introduction to Operating Systems

What is an Operating System?


An Operating System (OS) is an interface between a computer user and computer hardware. An operating
system is a software which performs all the basic tasks like file management, memory management,
process management, handling input and output, and controlling peripheral devices such as disk drives
and printers. The purpose of an operating system is to provide an environment in which user can execute
programs.

Figure 1. Components of a Computer System

What are the goals of an Operating System?


There are two major goals of an OS:
1. Make the computer system convenient to use.
2. Use the computer hardware in an efficient manner.

Functions of an Operating System


1. Memory Management – refers to management of Primary Memory or Main Memory. The
Operating System does the following activities for memory management:
a. Keep tracks of primary memory, i.e., what part of it are in use by whom, what part are
not in use.
b. In multiprogramming, the OS decides which process will get memory when and how
much.
c. Allocates the memory when a process requests it to do so.
d. De-allocates the memory when a process no longer needs it or has been terminated.

Note: There are two major types of memory:


i. Primary Memory – Also known as the Read Write Memory or the Main Memory.
It is a volatile memory as the data loses when the power is turned off. It has also
limited storage. (Example: RAM)
ii. Secondary Memory – Stores crucial information essential to operate the system,
like the program essential to boot the computer. Unlike the primary memory,
secondary memory is a non-volatile memory and it always retains its data.
(Example: ROM)

Page 1 of 5
Operating Systems Lecture Notes
Week 1 – Introduction to OS

Table 1. Difference between Primary Memory and Secondary Memory

2. Processor Management – In multiprogramming environment, the OS decides which process gets


the processor when and for how much time. This function is called process scheduling. An OS
does the following activities for processor management:
a. Keeps tracks of processor and status of a process. The program responsible for this task
is known as traffic controller.
b. Allocates the processor (CPU) to a process.
c. De-allocates processor when a process is no longer required.

3. Device Management – An Operating System manages device communication via their respective
drivers. It does the following activities for device management:
a. Keeps tracks for all devices. The program responsible for this task is known as the I/O
Controller.
b. Decides which process gets the device when and for how much time.
c. Allocates the device in the most efficient way.
d. De-allocates devices.

4. File Management – A file system is normally organized into directories for easy navigation and
usage. These directories may contain files and other directories. An OS does the following
activities for file management:
a. Keeps track of information, location, uses, status, etc. The collective facilities are often
known as file system.
b. Decides who gets the resources.
c. Allocates the resources
d. De-allocates the resources

5. Security – By means of password and similar other techniques, it prevents unauthorized access
to programs and data.

6. Control over system performance – Recording delays between request for a service and response
from the system.

7. Job Accounting – Keeping track of time and resources used by various jobs and users.

8. Error detecting aids – Protection of dumps, traces, error messages, and other debugging and error
detecting aids.

9. Coordination between other software and users – Coordination and assignment of compilers,
interpreters, assemblers, and other software to the various users of the computer systems.

Types of Operating System

1. Batch Operating System – This type of operating system does not interact with the computer
directly. There is an operator which takes similar jobs having same requirement and group them

Page 2 of 5
Operating Systems Lecture Notes
Week 1 – Introduction to OS

into batches. It is the responsibility of operator to sort the jobs with similar needs. Examples of
Batch OS are Billing System, Payroll System, Bank Statements, etc.

Figure 2. Batch Operating System

2. Time-Sharing Operating System – Each task is given some time to execute, so that all the tasks
work smoothly. Each user gets time of CPU as they use single system. These systems are also
known as Multitasking Systems. The task can be from single user or from different users also. The
time that each task gets to execute is called quantum. After this time interval is over, OS switches
over to next task. Examples of time-sharing OS are Multics, Unix, etc.

Figure 3. Time-Sharing OS

3. Distributed Operating System – These types of operating system is a recent advancement in the
world of computer technology and are being widely accepted all-over the world and, that too,
with a great pace. Various autonomous interconnected computers communicate each other using
a shared communication network. Independent systems possess their own memory unit and CPU.
These are referred as loosely coupled systems or distributed systems. These system’s processors
differ in size and function. The major benefit of working with these types of operating system is
that it is always possible that one user can access the files or software which are not actually
present on his system but on some other system connected within this network i.e., remote
access is enabled within the devices connected in that network. Example of distributed OS is
LOCUS.

Figure 4. Distributed Operating System

Page 3 of 5
Operating Systems Lecture Notes
Week 1 – Introduction to OS

4. Network Operating System - These systems run on a server and provide the capability to manage
data, users, groups, security, applications, and other networking functions. These type of
operating systems allow shared access of files, printers, security, applications, and other
networking functions over a small private network. One more important aspect of Network
Operating Systems is that all the users are well aware of the underlying configuration, of all other
users within the network, their individual connections etc. and that’s why these computers are
popularly known as tightly coupled systems. Examples of Network OS are Microsoft Windows
Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, etc.

Figure 5. Network Operating System

5. Real-Time Operating Systems - are used when there are time requirements are very strict like
missile systems, air traffic control systems, robots etc. There are two types of Real-Time OS:
a. Hard Real-Time Systems - These OSs are meant for the applications where time
constraints are very strict and even the shortest possible delay is not acceptable. These
systems are built for saving life like automatic parachutes or air bags which are required
to be readily available in case of any accident. Virtual memory is almost never found in
these systems.
b. Soft Real-Time Systems – These OSs are for applications where for time-constraint is less
strict. Examples of Soft Real-Time Systems are the sound system, video game console.

Characteristic Hard Real-Time Soft Real-Time


Response Time Hard-required Soft-required
Peak-load performance Predictable Degraded
Control of pace Environment Computer
Safety Often critical Non-critical
Size of data files Small/Medium Large
Redundancy type Active Checkpoint-recovery
Data integrity Short-term Long-term
Error detection Autonomous User assisted
Table 2. Major Differences between Hard and Soft Real-Time Systems

Table 2 shows the major differences between hard and soft real-time systems. The
response time requirements of hard real-time systems are in the order of milliseconds or less and
can result in a catastrophe if not met. In contrast, the response time requirements of soft real-
time systems are higher and not very stringent. In a hard real-time system, the peak-load
performance must be predictable and should not violate the predefined deadlines. In a soft real-
time system, a degraded operation in a rarely occurring peak load can be tolerated. A hard real-
time system must remain synchronous with the state of the environment in all cases. On the other
hand soft real-time systems will slow down their response time if the load is very high. Hard real-
time systems are often safety critical. Hard real-time systems have small data files and real-time
databases. Temporal accuracy is often the concern here. Soft real-time systems for example, on-
line reservation systems have larger databases and require long-term integrity of real-time
systems. If an error occurs in a soft real-time system, the computation is rolled back to a previously

Page 4 of 5
Operating Systems Lecture Notes
Week 1 – Introduction to OS

established checkpoint to initiate a recovery action. In hard real-time systems, roll-back/recovery


is of limited use.

Operating System Components

OPERATING SYSTEMS
Secondary
Memory Process Security I/O System File System
Shell Storage
Manager Manager Manager Manager Manager
Manager
- Graphical - Allocate and - Dispatcher - Security of - Free space - Buffer- - File creation
User deallocate - Process the whole management caching and deletion
Interface memory creation and computer - Storage system - Directory
- Command space as deletion system allocation - General creation and
Line needed - Process - Disk device- deletion
suspension scheduling driver - File backup
and interface on stable
resumption - Drivers for (nonvolatile)
specific storage
hardware media.
devices

Online Resources

 https://ssmengg.edu.in/weos/weos/upload/EStudyMaterial/Cse/6th%20sem/Operating%20syst
em/operating%20system.pdf
 https://www.geeksforgeeks.org/types-computer-memory-ram-rom/
 https://www.tutorialspoint.com/operating_system/operating_system_tutorial.pdf
 https://www.geeksforgeeks.org/types-of-operating-systems/
 https://users.ece.cmu.edu/~koopman/des_s99/real_time/
 http://www.cs.um.edu.mt/~jcor1/oldwebsite/OS4.pdf

Page 5 of 5

Potrebbero piacerti anche