hard copy sql

38

Upload: bhavesh-khomne

Post on 07-Apr-2016

25 views

Category:

Documents


3 download

DESCRIPTION

sql

TRANSCRIPT

Page 1: hard copy sql
Page 2: hard copy sql

Bhavesh Khomne(250)

Page 3: hard copy sql

TOPICS

1. INTRODUCTION2. SYSTEM CALLS3. INSTALLATION PROCESS4. PROCESS MANAGEMENT5. MEMORY MANAGEMENT6. BOOTING PROCESS7. COMPATIBLE PROCESSORS8. HARDWARE CONFIGURATION

Page 4: hard copy sql

Introduction:• Windows 98 Memphis is a graphical operating

system by Microsoft.• It is a hybrid 16-bit/32-bit monolithic product with an MS-

DOS based boot loader.• Development of Windows 98:

Memphis: Windows Memphis Alpha: Windows Memphis beta: Windows 98 Beta: Windows 98 Release Candidate: Windows98: Windows98 SE

Page 5: hard copy sql

What is System Calls ?

•Programming interface to the services provided by the OS

•Typically written in a high-level language (C or C++)

•Mostly accessed by programs via a high-level Application Program Interface (API) rather than direct system call use

•Three most common APIs are Win32 API for Windows.

•Example of System Calls:

•System call sequence to copy the contents of one file to another file.

Page 6: hard copy sql

Types of System CallsProcess Control:Create process(aplname,currentdirectory)Exit process(exitcode)Wait for single object(handle,millisec)

File Manipulation: Create file(filename, mode) Read file(file, no of bytes) Write file(file, no of bytes)

Device Manipulation:Set Console Mode(mode, console handle)Read Console(reserved, no of characters to write)Write Console(reserved, no of characters to read)

Page 7: hard copy sql

Cont. Types of System CallsInformation Maintenance:Set Timer(elapse)Sleep(millisec)

Communication: Create Pipe( read, write, size)

Create File Mapping( name, max size high)

Protection:Set file Security()Initialize File Security Descriptor(security descriptor)

Page 8: hard copy sql

Installation Process

What do we need ?

1) Windows 98 CD 2) Windows 98 Product ID/Key 3) About 1-2 Hours

Page 9: hard copy sql

What Is A Process & Process management?

•A process is a sequential program in execution.•Consists of: executable code, data, stack, CPU registers , and other information.•The act of managing the use of the CPU by individual processes is called process management.•The life of a process is bounded by its creation and termination. •The steps in process management.

•Process creation and termination.•Process scheduling & its algorithms.•Inter Process Communication

Page 10: hard copy sql

Process creation•When a new process is to be added to those that are currently being managed by the operating system, the operating system builds the data structures that are used to manage the process and allocates the address space to be used by the process . These actions constitute the creation of a new process. •The common events that lead to the creation of a process.

• New batch job• Interactive logon• Created by OS to provide a service

•In windows98 the process is created using create process() Win32 API.

Page 11: hard copy sql

Termination of a Process•The ending or exiting the process created is called as process termination.•The various ways for terminating a process.

•Normal task completion•Memory unavailable•Time limit exceeded•I/O failure•Parent termination•Parent request

•In windows98 the process is created using create process() Win32 API.

Page 12: hard copy sql

Scheduling CriteriaCPU utilization – keep the CPU as busy as possible

Throughput – # of processes that complete their execution per time unit

Turnaround time – amount of time to execute a particular process

Waiting time – amount of time a process has been waiting in the ready queue

Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment)

Page 13: hard copy sql

Scheduling Algorithm

•First-Come, First-Served (FCFS) Scheduling.•Shortest-Job-First (SJF) Scheduling.•Priority Scheduling.•Round Robin

Page 14: hard copy sql

First-come, First Served

·( FCFS) same as FIFO·Simple, fair, but poor performance. ·Average queuing time may be long.·What are the average queuing and residence

times for this scenario?·How do average queuing and residence times

depend on ordering of these processes in the queue?

Page 15: hard copy sql

Example of FCFS:

Process Burst TimeP1 24P2 3P3 3 Assume processes arrive as: P1 , P2 , P3

The Gantt Chart for the schedule is:

Waiting time for P1 = 0; P2 = 24; P3 = 27Average waiting time: (0 + 24 + 27)/3 = 17

P1 P2 P3

24 27 300

Page 16: hard copy sql

Shortest Job First•Process declares its CPU burst length•Two schemes:

•non-preemptive – once CPU assigned, process not preempted until its CPU burst completes.•Preemptive – if a new process with CPU burst less than remaining time of current, preempt. Shortest-Remaining-Time-First (SRTF).

•SJF is optimal – gives minimum average waiting time for a given set of processes.

Page 17: hard copy sql

Example of Non-Preemptive SJF

Page 18: hard copy sql

Example of Preemptive SJF(Shortest-remaining-time-first)

Process Arrival Time Burst TimeP1 0.0 7 P2 2.0 4 P3 4.0 1 P4 5.0 4

• SJF (pre-emptive, varied arrival times)

• Average waiting time = ( [(0 – 0) + (11 - 2)] + [(2 – 2) + (5 – 4)] + (4 - 4) + (7 – 5) )/4

= 9 + 1 + 0 + 2)/4 = 3

• Average turn-around time = (16 + 7 + 5 + 11)/4 = 9.75

P1 P3P2

42 110

P4

5 7

P2 P1

16

Page 19: hard copy sql

Priority Scheduling•Priority associated with each process•CPU allocated to process with highest priority

Preemptive or non-preemptiveExample - SJF: priority scheduling where priority is predicted next CPU burst time.

•Problem: Starvation low priority processes may never execute.

•Solution: Agingas time progresses increase the priority of the process.

Page 20: hard copy sql

Round Robin (RR)Process Burst TimeP1 53 P2 17 P3 68 P4 24

• The Gantt chart is:

• Typically, higher average turnaround than SJF, but better response time• Average waiting time

= ( [(0 – 0) + (77 - 20) + (121 – 97)] + (20 – 0) + [(37 – 0) + (97 - 57) + (134 – 117)] + [(57 – 0) + (117 – 77)] ) / 4 = (0 + 57 + 24) + 20 + (37 + 40 + 17) + (57 + 40) ) / 4 = (81 + 20 + 94 + 97)/4= 292 / 4 = 73

• Average turn-around time = 134 + 37 + 162 + 121) / 4 = 113.5

P1 P2 P3 P4 P1 P3 P4 P1 P3 P3

0 20 37 57 77 97 117 121 134 154 162

Page 21: hard copy sql

Inter Process communication (IPC)

•Inter-Process Communication, which in short is known as IPC, deals mainly with the techniques and mechanisms that facilitate communication between processes.•Windows 98 includes the following inter process communication (IPC) mechanisms to support distributed computing: 1. Windows Sockets2. Remote Procedure Calls (RPCs)3. NetBIOS4. Named pipes5. Mail slots

Page 22: hard copy sql

Windows Sockets•WinSock provides very high level networking capabilities.• It supports TCP/IP (the most widely used protocol), along with many other protocols – AppleTalk, DEC Net, IPX/SPX etc.•WinSock supports Berkeley sockets, along with many other Windows specific extensions.•There are two version that are supported i.e. 1.1 & 2.0•Following are some of the Win32 APIs that are used when working with WinSocket•socket()•bind()•listen()•accept()•connect()•send()•recv()

Page 23: hard copy sql

VMM(Virtual Memory Manager)

1. Windows 98's Virtual Memory Manager (VMM) controls allocating physical and logical memory.

2. When you launch a new application, the Virtual Memory Manager initializes the virtual address space.

3. Windows 98's Virtual Memory Manager provides this large, virtual memory space to applications via two memory management processes: paging, or moving data between physical RAM and the hard disk, and translating physical memory addresses to virtual memory addresses or mapped file I/O.

Page 24: hard copy sql

When does Page faults occurs?

When an application accesses a virtual address in a page marked invalid, the processor uses a system trap called a page fault.

The virtual memory system locates the required page on disk and loads it into a free page frame in physical memory.

When the amount of available page frames runs short, the virtual memory system selects page frames to free and pages their

contents out to disk. Paging occurs transparently for the user and the program or

application.

What is Paging?Paging is an important part of virtual memory implementation in most contemporary general-purpose operating systems, allowing them to use disk storage for data that does not fit into physical random-access memory (RAM).

Page 25: hard copy sql

Random Page Replacement

The characteristics are:Choose a page at randomLow overheadMay replace the page likely to be referenced almost immediatelyRarely used

Page 26: hard copy sql

First-In-First-Out (FIFO)

The page that has been in the main memory for the longest period of time is replacedIn general, if more page frames are allocated to a process, the fewer page faults the process will experienceIn FIFO, it was observed that under certain page reference patterns, actually more page faults occur

Page 27: hard copy sql

Least Recently Used (LRU)

The page not referenced for the longest period of time is removed. (Microsoft Windows 3.1/95/98/NT use this.)A near to optimal algorithmMost algorithm used is either LRU or its variantImplementation•Each page table entry has a counter•whenever a page is referenced, copy the clock into the counter•when a page needs to be replaced, search for a page with the smallest counter value•This is expensive•Stack•keep a stack of page numbers in a double link form•when a page is referenced, move it to the top•the page number at the bottom of the stack indicates the page to be replaced

Page 28: hard copy sql

Optimal page replacement

1. Page fault occurs2. Scan all pages currently in memory3. Determine which page won’t be

needed (referenced) until furthest in the future

4. Replace that pageNot really possible. (But useful as a

benchmark.)Depends on code as well as data.

Page 29: hard copy sql

Not-Used-Recently (NUR)It is an approximation to LRU.Pages not used recently are not likely to be used in the near futureimplemented with 2 hardware bits/page .Bit Value DescriptionReference bit 0 Not reference 1 ReferencedModified bit 0 Not modified 1 ModifiedWhen a page is referenced,set reference bit to 1All reference bits are reset to 0 periodicallyPages are replaced according to the following order1) Unreferenced, Unmodified2) Unreferenced, Modified3) Referenced, Unmodified4) Referenced, Modified

Page 30: hard copy sql

Least Frequently Used

• Page recently used is likely to be used in the near future; page not used in ages is not likely to be used in the near future.

• Algorithm:– “age” the pages

• Maintain a queue of pages in memory.– Recently used at front; oldest at rear.

• Every time a page is referenced, it is removed from the queue and placed at the front of the queue.

• This is slow!

Page 31: hard copy sql

Why is Booting Required ?Hardware doesn’t know where the operating system

resides and how to load it.Need a special program to do this job – Bootstrap

loader. E.g. BIOS – Basic Input Output System.

Bootstrap loader locates the kernel, loads it into main memory and starts its execution.

Page 32: hard copy sql

How Boot process occurs ?

Reset event on CPU (power up, reboot) causes instruction register to be loaded with a predefined memory location. It contains a jump instruction that transfers execution to the location of Bootstrap program. BIOS Interaction:

Page 33: hard copy sql

Booting Process for USB driveRequirements: 1 USB Flash Drive An original copy of Windows 98 SE.

• Steps for process of booting: 1.Download HP USB Disk Storage Format Tool HERE

2.Install HP USB Disk Storage Format Tool and run it3.Insert your USB Flash Drive4.Begin the format process.

5.Browse and locate the “win98boot” folder. 6.Insert your w98 CD. Copy the whole CD to your 2nd flash drive 7.AS copy process will take time till then restart your PC\Laptop. 8.A screen saying "WINDOWS 98" will quickly appear and then disappear. 9.Now your on the command prompt, type "D:" then type "setup /c /it /p a;b" *without quotations. 10.Follow the instructions. 11.The process have successfully booted.

Page 34: hard copy sql

Compatible Processors

Page 35: hard copy sql

Processor Advantages Disadvantages Bottom LinePentium III Fast, scalable. Expensive. The right

choice for performance oriented users skittish about AMD.

Intel Celeron Affordable; fast enough.

No SSE (yet). A good bet for all but the most power-hungry users.

AMD Athlon Faster, cheaper than the Pentium III.

Not all SSE instructions supported; no dual-processor support yet;

A real alternative--if AMD can keep its act together.

Cyrix M II Affordable; adequate for low-end machines.

Sale of the company may make PC makers wary.

Worth considering for a budget-priced home machine.

Page 36: hard copy sql

Hardware Configuration

Page 37: hard copy sql

•A personal computer with a 486DX 66 megahertz (MHz) or faster processor (Pentium central processing unit recommended).•16 megabytes (MB) of memory (24 MB recommended).•One 3.5-inch high-density floppy disk drive.•VGA or higher resolution (16-bit or 24-bit color SVGA recommended).•MSN, The Microsoft Network, Windows Messaging, or Internet access require a 14.4 bits per second (bps) modem (28.8 or faster recommended).Optional components:•Network adapter•DVD-ROM drive and decoder adapter•Second monitor and second video adapter•ATI All-in-Wonder graphics card

Page 38: hard copy sql