Download presentation
Presentation is loading. Please wait.
Published byGertrude Stanley Modified over 8 years ago
1
Lab1 Lab1 Operating Systems Basics Operating System CPIT 260 Instructor: Bashair Ali Alrashed
2
Objectives To understand the basics of operating system. To understand about device drivers. Introduction to different operating systems. To understand the role of an operating system. To understand the core tasks of operating system Defining program and a process
3
Operating System (OS) It is an interface between hardware and user, which is responsible for the management and coordination of activities and the sharing of the resources of a computer, that acts as a host for computing applications run on the machine.interfacehardwareusercomputing applications An operating system or OS, is a fundamental component of a computer system that manages activities and resources on the machine
4
Operating System (OS) The most well known OS include: System Software programs that manage the operation of a computer Application Software programs that help the user perform a particular task
5
System Software System Software are programs that Control the overall operation of the computer OS Interact directly with HW, device drivers, VGA driver, Driver Perform system management & maintenance, Norton Ghost, Ant viruses. Are used to develop or maintain other programs Language translators Interpreter or Compiler for high level languages
6
Operating System Performs its work invisibly to control the internal functions of a computer, e.g. maintaining files on the disk drive, managing the screen, controlling which tasks the CPU performs and in what order It interacts directly with the computer HW Other SW normally does not directly interact with the HW, but through the OS
7
Firmware (Boot up) OS components that are stored permanently on chip (ROM) and not on the disk drive because its non-volatile storage and capable of holding large quantities of data permanently. When a computer is powered-on, firmware is the first program that it always executes Firmware consists of startup and a few low-level I/O routines that assist the computer in finding out and executing the rest of the OS On IBM-compatible PC’s, it is called BIOS Location of Operating System
8
The Role of an OS The 1st program that runs when a typical computer is turned ON, and the last one to finish running when the computer is turned OFF It manages the HW and SW resources of the computer system, often invisibly. These include the processor, memory, disk drives, etc. It provides a simple, consistent way for applications to interact with the HW without having to know all the details of the HW Open source describes practices in production and development that promote access to the end product's source materials
9
OS Parts The operating system comprises a set of software packages that can be used to manage interactions with the hardware. The following elements are generally included in this set of software: The kernel, is a bridge between applications and the actual data processing done at the hardware level. it’s represents the operating system's basic functions its responsibilities include managing the system's resources (the communication between hardware and software components) The shell, allowing communication with the operating system via a control language, letting the user control the peripherals without knowing the characteristics of the hardware used, management of physical addresses, etc. example: c> format a: The file system, allowing files to be recorded in a tree structure.
10
Examples of Operating Systems Windows Linux Unix Mac OS Solaris DOS
11
Microsoft Operating Systems Windows 9x Windows 95, Windows 98, Windows Millennium Edition, OS/2 (developed jointly with IBM) Windows NT Windows NT 3.1 (OS/2 3.0), Windows NT 3.5 (Windows 3.5), Windows NT 3.51 (Windows 3.51), Windows NT 4.0 (Windows 4), Windows 2000 (Windows NT 5.0 Windows XP +Windows NT 5.1 Windows Server 2003 Windows 7 (Windows 6.1) Windows CE (OS for handhelds, embedded devices, and real similar to other versions of Windows) Windows CE 3.0, CE 5.0, CE 6.0, Windows mobile
12
Linux and Unix UNIX: A popular multi-user, multitasking operating system developed at Bell Labs in the early 1970s. After Unix System V, it ceased to be developed as a single operating system, and was instead developed by various competing companies, such as Solaris (from Sun Microsystems), AIX (from IBM), HP-UX (from Hewlett-Packard), and IRIX (from Silicon Graphics). UNIX is a specification for baseline interoperability between these systems, even though there are many major architectural differences between them. LINUX: Linux is a UNIX-like operating system that was designed to provide personal computer users a free or very low-cost operating system comparable to traditional and usually more expensive UNIX systems. Linux has never been certified as being a version of UNIX, A comprehensive list of differences between Linux and "UNIX" isn't possible, because there are several completely different "UNIX" systems.
13
Linux and UNIX Pardus Linux-based operating system developed by the Turkey Scientific and Technical Research Association. You can use it both in Turkish and English. Peanut Linux Small but packed and nice looking Linux distribution, only 210 Mb download installs to 600 Mb on your hard disk. Puppy Linux Small Linux distribution, only 60mb in size. Can boot from CD, USB disk and run inside Windows or standalone. RedHat Non-free Linux editions for server computers, sold by annual subscription. Other Linux Flavors’ Mandriva, Suse, Ubuntu, Fedora,Tiny linux, xandros, United Linux etc.
14
Other Operating Systems Apple: Macontosh INTEL BASED : OS/2 Java Operating System: jnode
15
Program vs. Process ProgramProcess Set of instructionProcess is active. It is staticIt is program in execution The contents are stored on the Hard Disk Every process occurs at a different memory location
16
Process vs. Thread ProcessThread requires careful programmingeasier to create processes don't share the same address space don't require a separate address space It is program in executionUnit of execution consist of multiple threads.It is a sub process During the Context Switching between the processes the cache gets invalidated where as in the context switching of the threads the cache does not invalidate. independentinterdependent
17
Process vs. Thread
18
Fork (System Call) For a process to start the execution of a different program need a way to create new processes We need process call forks, it creates a copy of itself.processcopy Fork is come from Unix OS is created with the fork() it type of system call system call Usually a system call, implemented in the kernel.system callkernel The original process that calls fork() is the parent process, and the newly created process is the child process.parent processchild process Creates a separate address space for the child.address space The child process has an exact copy of all the memory segments of the parent process.Both the parent and child processes possess the same code segments, but execute independently of each other. Both processes return from the system call and execute the next instruction
19
Usage The system call takes no arguments. Like fork() If it returns a negative value, the creation of a child process was not successful. Otherwise, in the child process, the return value of fork() is zero, whereas the return value in the parent process is the process identifier of the newly created child process (a positive value).process identifier Since both processes continue executing the same program, they typically distinguish the parent from the child by testing the return value of fork().
20
#include int main() { pid_t pid; /* fork a child process */ pid = fork(); if (pid < 0) { /* error occurred */ fprintf(stderr, "Fork Failed\n"); exit(-1); } else if (pid == 0) { /* child process */ printf("I am the child %d\n",pid); execlp("/bin/ls","ls",NULL); } else { /* parent process */ /* parent will wait for the child to complete */ printf("I am the parent %d\n",pid); wait(NULL); printf("Child Complete\n"); exit(0); }
21
The main purpose of OS To provide an environment for a computer user to execute programs on computer hardware in a convenient and efficient manner. To allocate the separate resources of the computer as needed to solve the problem given. The allocation process should be as fair and efficient as possible. As a control program it serves two major functions: supervision of the execution of user programs to prevent errors and improper use of the computer, management of the operation and control of I/O devices.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.