I1100 - Chapter - 03 - Operating Systems Audio
I1100 - Chapter - 03 - Operating Systems Audio
I1100
Introduction to Computer Science
2020 - 2021
Operating system
Introduction
User
System
Hardware
3
The kernel is a program that constitutes the central core of an operati
computer resources (CPU, memory, Input/output) and enables the com
Operating system components hardware and software. The kernel is responsible for all major activitie
Its main function is the process execution, and managing the input/outp
A command interpreter (shell) allows the communication with th
command language in order to let the user to control the input/output
• The operating system is made up of a set of applications for
File system controls how data is stored and retrieved and allows you t
5
Characteristics of an operating system
• An operating system is called multi-task ( multithreaded )
when multiple tasks (called process) can be executed
simultaneously.
– An operating system is called multitasking (or multithreaded) when
it can perform more than one computer task at a time.
• Multyitasking is a technique that consists of running
multiple processes concurrently in parallel. These processes
share common processing resources such as a CPU.
• Multiprocessing is a technique which consists of
running many processors in parallel.
• Embedded systems are operating systems with a dedicated function intended to operate
on small machines (PDA, digital watches, and MP3 players) or embedded as part of a complete device
often including hardware and mechanical parts (traffic lights, factory controllers, hybrid vehicles, avionics, 6
Role of the operating system
• Processor management
– The OS is responsible for managing the allocation of the processor
between the different programs
• It is a matter of deciding which process is running at a given
time, when to stop the process, which will be the next, and
what it needs as resources for its execution.
• A process ( process ) is a sequence of instructions (in binary)
is loaded into memory ( RAM ) that run by the processor
7
Role of the operating system
• Input / output management
– The OS makes it possible to control the access of programs to
hardware resources via the drivers
– A driver is a program which contains the instructions to be executed
to use a certain computer peripheral. Each device has its own driver
• Network management
• Current operating systems offer user file sharing, protection
for these files, identification of machines and users
connected to the network, etc.
8
Role of the operating system
• Input / output management
– The OS makes it possible to control the access of programs to
hardware resources via the drivers
– A driver is a program which contains the instructions to be executed
to use a certain computer peripheral. Each device has its own driver
• Network management
• Current operating systems offer user file sharing, protection
for these files, identification of machines and users
connected to the network, etc.
9
Role of the operating system
• Central memory management (RAM)
– The OS is responsible for managing the memory space allocated to
each application.
• Secondary memory management (hard disk)
– = file management via a File Management System (FMS)
– The SGF offers primitives in order to create, copy, read, delete…
these files.
– It manages the space occupied by the files as well as the free space.
– It supports file sharing and protection in multi-user environment
10
File Management System
The main tasks of an FSM are:
• Store the files on a disk (distribution in the different blocks).
• Organize and structure all files (directories) in a hierarchical
manner.
• Allow to create, modify or delete a file
• Allow modification of file hierarchy.
• Manage free space on the hard drive.
• Manage files in a multi-user environment
11
File
12
Directory
• Called folder : computer object that can contain files and / or
directories
Structure sous Windows (Arborescence)
Structure in Windows (Tree structure)
13
MS-DOS
• The operating system allows the user to execute commands (often to
launch an application). A user can communicate with the operating
system (the Kernel functions) either via a command language
interface or via a graphical user interface (GUI).
• MS-DOS (Microsoft Disk Operating System) is an operating system
developed by Microsoft operating in single-tasking and single-user
mode. It is equipped with a command-line interface. The table
below presents some basic commands of MS-DOS:
15
MS-DOS
ØExemples :
16
mkdir, md directory_name Create a directory
rmdir, rd directory_name Delete a directory
type nul > file_name Create a file
move file_name destination Move a file to a specific locatio
Rania EL BAIDA 17
File and directory management (creation, delete, etc.)
User management
Software management
Exercises
Exercices
Exercise 1:
Use the MS-DOS commands to create a directory R1 in the C partition and two text files F1.txt and
F2.txt in R1. Then create a directory R2 in the D partition, and copy all the files of R1 into R2.
Exercise 2:
1. Create two directories INFO and MATH, and a file fich.txt in the C partition.
2. Create two subdirectories INFO1 and INFO2 in the INFO directory.
3. Move the file fich.txt into the MATH directory.
4. Delete the directory INFO1 and the file fich.txt.
Exercise 3:
The current directory is “C:\R1”. Use the MS-DOS to do the following actions: Create two subdirectories
18
R11 and R12 in the directory R1. Create a file F11.txt in the directory R12. Without changing a directory,
copy the file F11.txt into the directory R11. Go to the directory R11. Remove the file F11.txt from the
19
Write the MS-DOS commands that allow to:
1. Create two directories INFO and MATH, and a file fich.txt in the C partition.
2. Create two subdirectories INFO1 and INFO2 in the INFO directory.
3. Move the file fich.txt into the MATH directory.
4. Delete the directory INFO1 and the file fich.txt.
Exercise 3:
The current directory is “C:\R1”. Use the MS-DOS to do the following actions: Create two subdirectories
R11 and R12 in the directory R1. Create a file F11.txt in the directory R12. Without changing a directory,
copy the file F11.txt into the directory R11. Go to the directory R11. Remove the file F11.txt from the
directory R12. Finally delete the directory R12.
Exercise 4:
4.1) Use the MS-DOS commands to create the following directory and file tree:
B 20
Exercise 3:
The current directory is “C:\R1”. Use the MS-DOS to do the following actions: Create two subdirectories
R11 and R12 in the directory R1. Create a file F11.txt in the directory R12. Without changing a directory,
copy the file F11.txt into the directory R11. Go to the directory R11. Remove the file F11.txt from the
directory R12. Finally delete the directory R12.
Exercise 4:
4.1) Use the MS-DOS commands to create the following directory and file tree:
D C
4.2) Make D the current directory, create a file F4.pdf in the directory B.
4.3) Move all the files in the directory D into the directory B.
4.4) Delete all the subdirectories in the directory B. I should empty & delete all subdirectories in B.
4.5) Copy the directory B in the directory A 21
4.3) Move all the files in the directory D into the directory B.
4.4) Delete all the subdirectories in the directory B. I should empty & delete all subdirectories in B.
4.5) Copy the directory B in the directory A
L C
Suppose that the current the directory is D, and given the above directory tree. Use the MS-DOS
commands to:
5.1) Go to the parent directory A.