100% found this document useful (2 votes)
8 views

(Ebook) Modern Multithreading: Implementing, Testing, and Debugging Multithreaded Java and C++/Pthreads/Win32 by Richard H. Carver, Kuo-Chung Tai ISBN 9780471725046, 0471725048 download

The document is an overview of the ebook 'Modern Multithreading' by Richard H. Carver and Kuo-Chung Tai, which covers implementing, testing, and debugging multithreaded programs in Java and C++/Pthreads/Win32. It includes topics such as concurrent programming, critical section problems, semaphores, locks, and monitors, along with practical examples and exercises. The ebook is published by John Wiley & Sons, Inc. and is available for download at ebooknice.com.

Uploaded by

opeogvyy9438
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
8 views

(Ebook) Modern Multithreading: Implementing, Testing, and Debugging Multithreaded Java and C++/Pthreads/Win32 by Richard H. Carver, Kuo-Chung Tai ISBN 9780471725046, 0471725048 download

The document is an overview of the ebook 'Modern Multithreading' by Richard H. Carver and Kuo-Chung Tai, which covers implementing, testing, and debugging multithreaded programs in Java and C++/Pthreads/Win32. It includes topics such as concurrent programming, critical section problems, semaphores, locks, and monitors, along with practical examples and exercises. The ebook is published by John Wiley & Sons, Inc. and is available for download at ebooknice.com.

Uploaded by

opeogvyy9438
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

(Ebook) Modern Multithreading: Implementing,

Testing, and Debugging Multithreaded Java and


C++/Pthreads/Win32 by Richard H. Carver, Kuo-Chung
Tai ISBN 9780471725046, 0471725048 download pdf

https://ebooknice.com/product/modern-multithreading-implementing-
testing-and-debugging-multithreaded-java-and-c-pthreads-win32-974114

Visit ebooknice.com today to download the complete set of


ebook or textbook
We have selected some products that you may be interested in
Click the link to download now or visit ebooknice.com
for more options!.

(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason; Viles,


James ISBN 9781459699816, 9781743365571, 9781925268492,
1459699815, 1743365578, 1925268497

https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374

(Ebook) SAT II Success MATH 1C and 2C 2002 (Peterson's SAT II


Success) by Peterson's ISBN 9780768906677, 0768906679

https://ebooknice.com/product/sat-ii-success-math-1c-and-2c-2002-peterson-
s-sat-ii-success-1722018

(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena Alfredsson, Hans


Heikne, Sanna Bodemyr ISBN 9789127456600, 9127456609

https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312

(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master the SAT
Subject Test: Math Levels 1 & 2) by Arco ISBN 9780768923049,
0768923042

https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-arco-
master-the-sat-subject-test-math-levels-1-2-2326094
(Ebook) Cambridge IGCSE and O Level History Workbook 2C - Depth
Study: the United States, 1919-41 2nd Edition by Benjamin
Harrison ISBN 9781398375147, 9781398375048, 1398375144,
1398375047
https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044

(Ebook) Smart Grammar and Vocabulary: Split edition 2B Student's


Book by H. Q. Mitchell ISBN 9789604434497, 9604434497

https://ebooknice.com/product/smart-grammar-and-vocabulary-split-
edition-2b-student-s-book-23340516

(Ebook) Python Advanced Programming: The Guide to Learn Python


Programming. Reference with Exercises and Samples About
Dynamical Programming, Multithreading, Multiprocessing,
Debugging, Testing and More by Marcus Richards
https://ebooknice.com/product/python-advanced-programming-the-guide-to-
learn-python-programming-reference-with-exercises-and-samples-about-
dynamical-programming-multithreading-multiprocessing-debugging-testing-and-
more-56236028

(Ebook) Primary Mathematics Workbook 2B by Jennifer Hoerst ISBN


9780761469933, 0761469931

https://ebooknice.com/product/primary-mathematics-workbook-2b-23520620

(Ebook) Primary Mathematics Textbook 2B by Jennifer Hoerst ISBN


9780761469797, 0761469796

https://ebooknice.com/product/primary-mathematics-textbook-2b-23519854
MODERN MULTITHREADING
Implementing, Testing, and
Debugging Multithreaded Java and
C++/Pthreads/Win32 Programs

RICHARD H. CARVER
KUO-CHUNG TAI

A JOHN WILEY & SONS, INC., PUBLICATION


MODERN MULTITHREADING
MODERN MULTITHREADING
Implementing, Testing, and
Debugging Multithreaded Java and
C++/Pthreads/Win32 Programs

RICHARD H. CARVER
KUO-CHUNG TAI

A JOHN WILEY & SONS, INC., PUBLICATION


Copyright  2006 by John Wiley & Sons, Inc. All rights reserved.

Published by John Wiley & Sons, Inc., Hoboken, New Jersey.


Published simultaneously in Canada.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any
form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise,
except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without
either the prior written permission of the Publisher, or authorization through payment of the
appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers,
MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requests
to the Publisher for permission should be addressed to the Permissions Department, John Wiley &
Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at
http://www.wiley.com/go/permission.

Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best
efforts in preparing this book, they make no representations or warranties with respect to the
accuracy or completeness of the contents of this book and specifically disclaim any implied
warranties of merchantability or fitness for a particular purpose. No warranty may be created or
extended by sales representatives or written sales materials. The advice and strategies contained
herein may not be suitable for your situation. You should consult with a professional where
appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other
commercial damages, including but not limited to special, incidental, consequential, or other
damages.

For general information on our other products and services or for technical support, please contact
our Customer Care Department within the United States at (800) 762-2974, outside the United
States at (317) 572-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print
may not be available in electronic formats. For more information about Wiley products, visit our
web site at www.wiley.com.

Library of Congress Cataloging-in-Publication Data:

Carver, Richard H., 1960–


Modern multithreading: implementing, testing, and debugging multithreaded Java and
C++/Pthreads/Win32 programs / by Richard H. Carver and Kuo-Chung Tai.
p. cm.
Includes bibliographical references and index.
ISBN-13 978-0-471-72504-6 (paper)
ISBN-10 0-471-72504-8 (paper)
1. Parallel programming (Computer science) 2. Threads (Computer programs) I. Tai,
Kuo-Chung. II. Title.

QA76.642.C38 2006
005.1 1–dc22
2005045775

Printed in the United States of America.

10 9 8 7 6 5 4 3 2 1
CONTENTS

Preface xi

1 Introduction to Concurrent Programming 1


1.1 Processes and Threads: An Operating System’s View, 1
1.2 Advantages of Multithreading, 3
1.3 Threads in Java, 4
1.4 Threads in Win32, 6
1.5 Pthreads, 9
1.6 C++ Thread Class, 14
1.6.1 C++ Class Thread for Win32, 14
1.6.2 C++ Class Thread for Pthreads, 19
1.7 Thread Communication, 19
1.7.1 Nondeterministic Execution Behavior, 23
1.7.2 Atomic Actions, 25
1.8 Testing and Debugging Multithreaded Programs, 29
1.8.1 Problems and Issues, 30
1.8.2 Class TDThread for Testing and Debugging, 34
1.8.3 Tracing and Replaying Executions with Class Template
sharedVariable<>, 37
1.9 Thread Synchronization, 38
Further Reading, 38
References, 39
Exercises, 41

v
vi CONTENTS

2 The Critical Section Problem 46


2.1 Software Solutions to the Two-Thread Critical Section
Problem, 47
2.1.1 Incorrect Solution 1, 48
2.1.2 Incorrect Solution 2, 49
2.1.3 Incorrect Solution 3, 50
2.1.4 Peterson’s Algorithm, 52
2.1.5 Using the volatile Modifier, 53
2.2 Ticket-Based Solutions to the n-Thread Critical Section
Problem, 54
2.2.1 Ticket Algorithm, 54
2.2.2 Bakery Algorithm, 56
2.3 Hardware Solutions to the n-Thread Critical Section
Problem, 58
2.3.1 Partial Solution, 59
2.3.2 Complete Solution, 59
2.3.3 Note on Busy-Waiting, 60
2.4 Deadlock, Livelock, and Starvation, 62
2.4.1 Deadlock, 62
2.4.2 Livelock, 62
2.4.3 Starvation, 63
2.5 Tracing and Replay for Shared Variables, 64
2.5.1 ReadWrite-Sequences, 65
2.5.2 Alternative Definition of ReadWrite-Sequences, 67
2.5.3 Tracing and Replaying ReadWrite-Sequences, 68
2.5.4 Class Template sharedVariable<>, 70
2.5.5 Putting It All Together, 71
2.5.6 Note on Shared Memory Consistency, 74
Further Reading, 77
References, 78
Exercises, 79

3 Semaphores and Locks 84


3.1 Counting Semaphores, 84
3.2 Using Semaphores, 86
3.2.1 Resource Allocation, 86
3.2.2 More Semaphore Patterns, 87
3.3 Binary Semaphores and Locks, 90
3.4 Implementing Semaphores, 92
3.4.1 Implementing P() and V(), 92
3.4.2 VP() Operation, 94
3.5 Semaphore-Based Solutions to Concurrent Programming
Problems, 96
3.5.1 Event Ordering, 96
CONTENTS vii

3.5.2 Bounded Buffer, 96


3.5.3 Dining Philosophers, 98
3.5.4 Readers and Writers, 101
3.5.5 Simulating Counting Semaphores, 108
3.6 Semaphores and Locks in Java, 111
3.6.1 Class countingSemaphore, 111
3.6.2 Class mutexLock, 113
3.6.3 Class Semaphore, 115
3.6.4 Class ReentrantLock, 116
3.6.5 Example: Java Bounded Buffer, 116
3.7 Semaphores and Locks in Win32, 119
3.7.1 CRITICAL SECTION, 119
3.7.2 Mutex, 122
3.7.3 Semaphore, 124
3.7.4 Events, 132
3.7.5 Other Synchronization Functions, 134
3.7.6 Example: C++/Win32 Bounded Buffer, 134
3.8 Semaphores and Locks in Pthreads, 134
3.8.1 Mutex, 136
3.8.2 Semaphore, 137
3.9 Another Note on Shared Memory Consistency, 141
3.10 Tracing, Testing, and Replay for Semaphores and Locks, 143
3.10.1 Nondeterministic Testing with the Lockset
Algorithm, 143
3.10.2 Simple SYN-Sequences for Semaphores and
Locks, 146
3.10.3 Tracing and Replaying Simple PV-Sequences and
LockUnlock-Sequences, 150
3.10.4 Deadlock Detection, 154
3.10.5 Reachability Testing for Semaphores and Locks, 157
3.10.6 Putting It All Together, 160
Further Reading, 163
References, 164
Exercises, 166

4 Monitors 177
4.1 Definition of Monitors, 178
4.1.1 Mutual Exclusion, 178
4.1.2 Condition Variables and SC Signaling, 178
4.2 Monitor-Based Solutions to Concurrent Programming
Problems, 182
4.2.1 Simulating Counting Semaphores, 182
4.2.2 Simulating Binary Semaphores, 183
4.2.3 Dining Philosophers, 183
4.2.4 Readers and Writers, 187
viii CONTENTS

4.3 Monitors in Java, 187


4.3.1 Better countingSemaphore, 190
4.3.2 notify vs. notifyAll, 191
4.3.3 Simulating Multiple Condition Variables, 194
4.4 Monitors in Pthreads, 194
4.4.1 Pthreads Condition Variables, 196
4.4.2 Condition Variables in J2SE 5.0, 196
4.5 Signaling Disciplines, 199
4.5.1 Signal-and-Urgent-Wait, 199
4.5.2 Signal-and-Exit, 202
4.5.3 Urgent-Signal-and-Continue, 204
4.5.4 Comparing SU and SC Signals, 204
4.6 Using Semaphores to Implement Monitors, 206
4.6.1 SC Signaling, 206
4.6.2 SU Signaling, 207
4.7 Monitor Toolbox for Java, 209
4.7.1 Toolbox for SC Signaling in Java, 210
4.7.2 Toolbox for SU Signaling in Java, 210
4.8 Monitor Toolbox for Win32/C++/Pthreads, 211
4.8.1 Toolbox for SC Signaling in C++/Win32/Pthreads, 213
4.8.2 Toolbox for SU Signaling in C++/Win32/Pthreads, 213
4.9 Nested Monitor Calls, 213
4.10 Tracing and Replay for Monitors, 217
4.10.1 Simple M-Sequences, 217
4.10.2 Tracing and Replaying Simple M-Sequences, 219
4.10.3 Other Approaches to Program Replay, 220
4.11 Testing Monitor-Based Programs, 222
4.11.1 M-Sequences, 222
4.11.2 Determining the Feasibility of an M-Sequence, 227
4.11.3 Determining the Feasibility of a
Communication-Sequence, 233
4.11.4 Reachability Testing for Monitors, 233
4.11.5 Putting It All Together, 235
Further Reading, 243
References, 243
Exercises, 245

5 Message Passing 258

5.1 Channel Objects, 258


5.1.1 Channel Objects in Java, 259
5.1.2 Channel Objects in C++/Win32, 263
5.2 Rendezvous, 266
5.3 Selective Wait, 272
CONTENTS ix

5.4 Message-Based Solutions to Concurrent Programming


Problems, 275
5.4.1 Readers and Writers, 275
5.4.2 Resource Allocation, 278
5.4.3 Simulating Counting Semaphores, 281
5.5 Tracing, Testing, and Replay for Message-Passing
Programs, 281
5.5.1 SR-Sequences, 282
5.5.2 Simple SR-Sequences, 288
5.5.3 Determining the Feasibility of an SR-Sequence, 290
5.5.4 Deterministic Testing, 296
5.5.5 Reachability Testing for Message-Passing
Programs, 297
5.5.6 Putting It All Together, 299
Further Reading, 304
References, 304
Exercises, 304

6 Message Passing in Distributed Programs 312

6.1 TCP Sockets, 312


6.1.1 Channel Reliability, 313
6.1.2 TCP Sockets in Java, 314
6.2 Java TCP Channel Classes, 317
6.2.1 Classes TCPSender and TCPMailbox, 318
6.2.2 Classes TCPSynchronousSender and
TCPSynchronousMailbox, 326
6.2.3 Class TCPSelectableSynchronousMailbox, 328
6.3 Timestamps and Event Ordering, 329
6.3.1 Event-Ordering Problems, 330
6.3.2 Local Real-Time Clocks, 331
6.3.3 Global Real-Time Clocks, 332
6.3.4 Causality, 332
6.3.5 Integer Timestamps, 334
6.3.6 Vector Timestamps, 335
6.3.7 Timestamps for Programs Using Messages and Shared
Variables, 339
6.4 Message-Based Solutions to Distributed Programming
Problems, 341
6.4.1 Distributed Mutual Exclusion, 341
6.4.2 Distributed Readers and Writers, 346
6.4.3 Alternating Bit Protocol, 348
6.5 Testing and Debugging Distributed Programs, 353
6.5.1 Object-Based Sequences, 353
6.5.2 Simple Sequences, 362
x CONTENTS

6.5.3 Tracing, Testing, and Replaying CARC-Sequences and


CSC-Sequences, 362
6.5.4 Putting It All Together, 369
6.5.5 Other Approaches to Replaying Distributed
Programs, 371
Further Reading, 374
References, 375
Exercises, 376

7 Testing and Debugging Concurrent Programs 381


7.1 Synchronization Sequences of Concurrent Programs, 383
7.1.1 Complete Events vs. Simple Events, 383
7.1.2 Total Ordering vs. Partial Ordering, 386
7.2 Paths of Concurrent Programs, 388
7.2.1 Defining a Path, 388
7.2.2 Path-Based Testing and Coverage Criteria, 391
7.3 Definitions of Correctness and Faults for Concurrent
Programs, 395
7.3.1 Defining Correctness for Concurrent Programs, 395
7.3.2 Failures and Faults in Concurrent Programs, 397
7.3.3 Deadlock, Livelock, and Starvation, 400
7.4 Approaches to Testing Concurrent Programs, 408
7.4.1 Nondeterministic Testing, 409
7.4.2 Deterministic Testing, 410
7.4.3 Combinations of Deterministic and Nondeterministic
Testing, 414
7.5 Reachability Testing, 419
7.5.1 Reachability Testing Process, 420
7.5.2 SYN-Sequences for Reachability Testing, 424
7.5.3 Race Analysis of SYN-Sequences, 429
7.5.4 Timestamp Assignment, 433
7.5.5 Computing Race Variants, 439
7.5.6 Reachability Testing Algorithm, 441
7.5.7 Research Directions, 447
Further Reading, 449
References, 449
Exercises, 452

Index 457
PREFACE

This is a textbook on multithreaded programming. The objective of this book


is to teach students about languages and libraries for multithreaded program-
ming, to help students develop problem-solving and programming skills, and to
describe and demonstrate various testing and debugging techniques that have been
developed for multithreaded programs over the past 20 years. It covers threads,
semaphores, locks, monitors, message passing, and the relevant parts of Java,
the POSIX Pthreads library, and the Windows Win32 Application Programming
Interface (API).
The book is unique in that it provides in-depth coverage on testing and debug-
ging multithreaded programs, a topic that typically receives little attention. The
title Modern Multithreading reflects the fact that there are effective and relatively
new testing and debugging techniques for multithreaded programs. The material
in this book was developed in concurrent programming courses that the authors
have taught for 20 years. This material includes results from the authors’ research
in concurrent programming, emphasizing tools and techniques that are of practi-
cal use. A class library has been implemented to provide working examples of
all the material that is covered.

Classroom Use
In our experience, students have a hard time learning to write concurrent pro-
grams. If they manage to get their programs to run, they usually encounter
deadlocks and other intermittent failures, and soon discover how difficult it is to
reproduce the failures and locate the cause of the problem. Essentially, they have
no way to check the correctness of their programs, which interferes with learn-
ing. Instructors face the same problem when grading multithreaded programs. It
xi
xii PREFACE

is tedious, time consuming, and often impossible to assess student programs by


hand. The class libraries that we have developed, and the testing techniques they
support, can be used to assess student programs. When we assign programming
problems in our courses, we also provide test cases that the students must use
to assess the correctness of their programs. This is very helpful for the students
and the instructors.
This book is designed for upper-level undergraduates and graduate students
in computer science. It can be used as a main text in a concurrent programming
course or could be used as a supplementary text for an operating systems course or
a software engineering course. Since the text emphasizes practical material, pro-
vides working code, and addresses testing and debugging problems that receive
little or no attention in many other books, we believe that it will also be helpful
to programmers in industry.
The text assumes that students have the following background:

ž Programming experience as typically gained in CS 1 and CS 2 courses.


ž Knowledge of elementary data structures as learned in a CS 2 course.
ž An understanding of Java fundamentals. Students should be familiar with
object-oriented programming in Java, but no “advanced” knowledge is
necessary.
ž An understanding of C++ fundamentals. We use only the basic object-
oriented programming features of C++.
ž A prior course on operating systems is helpful but not required.

We have made an effort to minimize the differences between our Java and C++
programs. We use object-oriented features that are common to both languages,
and the class library has been implemented in both languages. Although we don’t
illustrate every example in both Java and C++, the differences are very minor
and it is easy to translate program examples from one language to the other.

Content
The book has seven chapters. Chapter 1 defines operating systems terms such
as process, thread, and context switch. It then shows how to create threads, first
in Java and then in C++ using both the POSIX Pthreads library and the Win32
API. A C++ Thread class is provided to hide the details of thread creation
in Pthreads/Win32. C++ programs that use the Thread class look remarkably
similar to multithreaded Java programs. Fundamental concepts, such as atomicity
and nondeterminism, are described using simple program examples. Chapter 1
ends by listing the issues and problems that arise when testing and debugging
multithreaded programs. To illustrate the interesting things to come, we present
a simple multithreaded C++ program that is capable of tracing and replaying its
own executions.
Chapter 2 introduces concurrent programming by describing various solutions
to the critical section problem. This problem is easy to understand but hard
PREFACE xiii

to solve. The advantage of focusing on this problem is that it can be solved


without introducing complicated new programming constructs. Students gain a
quick appreciation for the programming skills that they need to acquire. Chapter 2
also demonstrates how to trace and replay Peterson’s solution to the critical
section problem, which offers a straightforward introduction to several testing and
debugging issues. The synchronization library implements the various techniques
that are described.
Chapters 3, 4, and 5 cover semaphores, monitors and message passing, respec-
tively. Each chapter describes one of these constructs and shows how to use
it to solve programming problems. Semaphore and Lock classes for Java and
C++/Win32/Pthreads are presented in Chapter 3. Chapter 4 presents monitor
classes for Java and C++/Win32/Pthreads. Chapter 5 presents mailbox classes
with send/receive methods and a selective wait statement. These chapters also
cover the built-in support that Win32 and Pthreads provide for these constructs,
as well as the support provided by J2SE 5.0 (Java 2 Platform, Standard Edi-
tion 5.0). Each chapter addresses a particular testing or debugging problem
and shows how to solve it. The synchronization library implements the test-
ing and debugging techniques so that students can apply them to their own
programs.
Chapter 6 covers message passing in a distributed environment. It presents
several Java mailbox classes that hide the details of TCP message passing and
shows how to solve several distributed programming problems in Java. It also
shows how to test and debug programs in a distributed environment (e.g., accu-
rately tracing program executions by using vector timestamps). This chapter by
no means provides complete coverage of distributed programming. Rather, it is
meant to introduce students to the difficulty of distributed programming and to
show them that the testing and debugging techniques presented in earlier chapters
can be extended to work in a distributed environment. The synchronization library
implements the various techniques.
Chapter 7 covers concepts that are fundamental to testing and debugging
concurrent programs. It defines important terms, presents several test coverage
criteria for concurrent programs, and describes the various approaches to test-
ing concurrent programs. This chapter organizes and summarizes the testing and
debugging material that is presented in depth in Chapters 2 to 6. This organiza-
tion provides two paths through the text. Instructors can cover the testing and
debugging material in the last sections of Chapters 2 to 6 as they go through those
chapters, or they can cover those sections when they cover Chapter 7. Chapter
7 also discusses reachability testing, which offers a bridge between testing and
verification, and is implemented in the synchronization library.
Each chapter has exercises at the end. Some of the exercises explore the con-
cepts covered in the chapter, whereas others require a program to be written.
In our courses we cover all the chapters and give six homework assignments,
two in-class exams, and a project. We usually supplement the text with readings
on model checking, process algebra, specification languages, and other research
topics.
xiv PREFACE

Online Resources
The home page for this book is located at

http://www.cs.gmu.edu/∼rcarver/ModernMultithreading

This Web site contains the source code for all the listings in the text and for the
synchronization libraries. It also contains startup files and test cases for some of
the exercises. Solutions to the exercises are available for instructors, as is a copy
of our lecture notes. There will also be an errata page.

Acknowledgments
The suggestions we received from the anonymous reviewers were very help-
ful. The National Science Foundation supported our research through grants
CCR-8907807, CCR-9320992, CCR-9309043, and CCR-9804112. We thank our
research assistants and the students in our courses at North Carolina State and
George Mason University for helping us solve many interesting problems. We
also thank Professor Jeff Lei at the University of Texas at Arlington for using
early versions of this book in his courses.
My friend, colleague, and coauthor Professor K. C. Tai passed away before
we could complete this book. K.C. was an outstanding teacher, a world-class
researcher in the areas of software engineering, concurrent systems, programming
languages, and compiler construction, and an impeccable and highly respected
professional. If the reader finds this book helpful, it is a tribute to K.C.’s many
contributions. Certainly, K.C. would have fixed the faults that I failed to find.

RICHARD H. CARVER

Fairfax, Virginia
July 2005
[email protected]
1
INTRODUCTION TO CONCURRENT
PROGRAMMING

A concurrent program contains two or more threads that execute concurrently


and work together to perform some task. In this chapter we begin with an oper-
ating system’s view of a concurrent program. The operating system manages
the program’s use of hardware and software resources and allows the program’s
threads to share the central processing units (CPUs). We then learn how to define
and create threads in Java and also in C++ using the Windows Win32 API
and the POSIX Pthreads library. Java provides a Thread class, so multithreaded
Java programs are object-oriented. Win32 and Pthreads provide a set of function
calls for creating and manipulating threads. We wrap a C++ Thread class around
these functions so that we can write C++/Win32 and C++/Pthreads multithreaded
programs that have the same object-oriented structure as Java programs.
All concurrent programs exhibit unpredictable behavior. This creates new chal-
lenges for programmers, especially those learning to write concurrent programs.
In this chapter we learn the reason for this unpredictable behavior and examine
the problems it causes during testing and debugging.

1.1 PROCESSES AND THREADS: AN OPERATING SYSTEM’S VIEW

When a program is executed, the operating system creates a process containing


the code and data of the program and manages the process until the program
terminates. User processes are created for user programs, and system processes

Modern Multithreading: Implementing, Testing, and Debugging Multithreaded Java


and C++/Pthreads/Win32 Programs, By Richard H. Carver and Kuo-Chung Tai
Copyright  2006 John Wiley & Sons, Inc.

1
2 INTRODUCTION TO CONCURRENT PROGRAMMING

are created for system programs. A user process has its own logical address space,
separate from the space of other user processes and separate from the space (called
the kernel space) of the system processes. This means that two processes may
reference the same logical address, but this address will be mapped to different
physical memory locations. Thus, processes do not share memory unless they
make special arrangements with the operating system to do so.
Multiprocessing operating systems enable several programs to execute simul-
taneously. The operating system is responsible for allocating the computer’s
resources among competing processes. These shared resources include memory,
peripheral devices such as printers, and the CPU(s). The goal of a multiprocess-
ing operating system is to have some process executing at all times in order to
maximize CPU utilization.
Within a process, program execution entails initializing and maintaining a
great deal of information [Anderson et al. 1989]. For instance:

ž The process state (e.g., ready, running, waiting, or stopped)


ž The program counter, which contains the address of the next instruction to
be executed for this process
ž Saved CPU register values
ž Memory management information (page tables and swap files), file descrip-
tors, and outstanding input/output (I/O) requests

The volume of this per-process information makes it expensive to create and


manage processes.
A thread is a unit of control within a process. When a thread runs, it executes
a function in the program. The process associated with a running program starts
with one running thread, called the main thread, which executes the “main”
function of the program. In a multithreaded program, the main thread creates
other threads, which execute other functions. These other threads can create even
more threads, and so on. Threads are created using constructs provided by the
programming language or the functions provided by an application programming
interface (API).
Each thread has its own stack of activation records and its own copy of
the CPU registers, including the stack pointer and the program counter, which
together describe the state of the thread’s execution. However, the threads in a
multithreaded process share the data, code, resources, and address space of their
process. The per-process state information listed above is also shared by the
threads in the program, which greatly reduces the overhead involved in creating
and managing threads. In Win32 a program can create multiple processes or
multiple threads. Since thread creation in Win32 has lower overhead, we focus
on single-process multithreaded Win32 programs.
The operating system must decide how to allocate the CPUs among the pro-
cesses and threads in the system. In some systems, the operating system selects a
process to run and the process selected chooses which of its threads will execute.
Alternatively, the threads are scheduled directly by the operating system. At any
ADVANTAGES OF MULTITHREADING 3

given moment, multiple processes, each containing one or more threads, may be
executing. However, some threads may not be ready for execution. For example,
some threads may be waiting for an I/O request to complete. The scheduling
policy determines which of the ready threads is selected for execution.
In general, each ready thread receives a time slice (called a quantum) of
the CPU. If a thread decides to wait for something, it relinquishes the CPU
voluntarily. Otherwise, when a hardware timer determines that a running thread’s
quantum has completed, an interrupt occurs and the thread is preempted to allow
another ready thread to run. If there are multiple CPUs, multiple threads can
execute at the same time. On a computer with a single CPU, threads have the
appearance of executing simultaneously, although they actually take turns running
and they may not receive equal time. Hence, some threads may appear to run at
a faster rate than others.
The scheduling policy may also consider a thread’s priority and the type of
processing that the thread performs, giving some threads preference over others.
We assume that the scheduling policy is fair, which means that every ready thread
eventually gets a chance to execute. A concurrent program’s correctness should
not depend on its threads being scheduled in a certain order.
Switching the CPU from one process or thread to another, known as a context
switch, requires saving the state of the old process or thread and loading the state
of the new one. Since there may be several hundred context switches per second,
context switches can potentially add significant overhead to an execution.

1.2 ADVANTAGES OF MULTITHREADING

Multithreading allows a process to overlap I/O and computation. One thread can
execute while another thread is waiting for an I/O operation to complete. Mul-
tithreading makes a GUI (graphical user interface) more responsive. The thread
that handles GUI events, such as mouse clicks and button presses, can create
additional threads to perform long-running tasks in response to the events. This
allows the event handler thread to respond to more GUI events. Multithread-
ing can speed up performance through parallelism. A program that makes full
use of two processors may run in close to half the time. However, this level of
speedup usually cannot be obtained, due to the communication overhead required
for coordinating the threads (see Exercise 1.11).
Multithreading has some advantages over multiple processes. Threads require
less overhead to manage than processes, and intraprocess thread communication
is less expensive than interprocess communication. Multiprocess concurrent pro-
grams do have one advantage: Each process can execute on a different machine
(in which case, each process is often a multithreaded program). This type of
concurrent program is called a distributed program. Examples of distributed pro-
grams are file servers (e.g., NFS), file transfer clients and servers (e.g., FTP),
remote log-in clients and servers (e.g., Telnet), groupware programs, and Web
browsers and servers. The main disadvantage of concurrent programs is that they
4 INTRODUCTION TO CONCURRENT PROGRAMMING

are extremely difficult to develop. Concurrent programs often contain bugs that
are notoriously difficult to find and fix. Once we have examined several concur-
rent programs, we’ll take a closer look at the special problems that arise when
we test and debug them.

1.3 THREADS IN JAVA

A Java program has a main thread that executes the main() function. In addi-
tion, several system threads are started automatically whenever a Java program
is executed. Thus, every Java program is a concurrent program, although the
programmer may not be aware that multiple threads are running. Java provides
a Thread class for defining user threads. One way to define a thread is to define
a class that extends (i.e., inherits from) the Thread class. Class simpleThread in
Listing 1.1 extends class Thread. Method run() contains the code that will be exe-
cuted when a simpleThread is started. The default run() method inherited from
class Thread is empty, so a new run() method must be defined in simpleThread
in order for the thread to do something useful.
The main thread creates simpleThreads named thread1 and thread2 and
starts them. (These threads continue to run after the main thread completes its
statements.) Threads thread1 and thread2 each display a simple message and
terminate. The integer IDs passed as arguments to the simpleThread constructor
are used to distinguish between the two instances of simpleThread.
A second way to define a user thread in Java is to use the Runnable interface.
Class simpleRunnable in Listing 1.2 implements the Runnable interface, which
means that simpleRunnable must provide an implementation of method run().
The main method creates a Runnable instance r of class simpleRunnable, passes
r as an argument to the Thread class constructor for thread3, and starts thread3.
Using a Runnable object to define the run() method offers one advantage
over extending class Thread. Since class simpleRunnable implements interface
Runnable, it is not required to extend class Thread, which means that

class simpleThread extends Thread {


public simpleThread(int ID) {myID = ID;}
public void run() {System.out.println(‘‘Thread ’’ + myID + ‘‘ is running.’’);}
private int myID;
}
public class javaConcurrentProgram {
public static void main(String[] args) {
simpleThread thread1 = new simpleThread(1);
simpleThread thread2 = new simpleThread(2);
thread1.start(); thread2.start(); // causes the run() methods to execute
}
}
Listing 1.1 Simple concurrent Java program.
Other documents randomly have
different content
naturally, are hardly distinguishable from black; and the substitution
of re-rolled exhausted leaves for genuine fresh leaves. There is also
in cheap teas often a considerable proportion of mineral matter, i.e.
added dirt. This last can be readily detected by chewing a small
quantity of the leaf, when dirt will be felt in the mouth. The presence
of exhausted leaves will be manifested by the increased weight of
solid matters left on boiling a sample repeatedly and drying the
residue. With genuine teas, the average weight of leaves (dried)
remaining after exhaustion is 65 per cent.; therefore 1 oz. of tea
thoroughly boiled should not give more than ⅔ oz. of exhausted
leaves weighed after drying. If the figure is higher, the addition of
exhausted leaves to the original tea may be suspected.
Coffee.—Coffee-berries can scarcely be adulterated without easy
detection, therefore the best safeguard is to buy the berries and
grind them at home. Ground coffee is nearly always adulterated with
chicory: in fact a certain proportion is allowed by law, and the
chicory is itself often largely mixed with various rubbish which by
roasting gives a brown colour to water. The simplest plan for
detecting the sophistication of ground coffee is to sprinkle some in a
glass of cold water: pure coffee will not colour the water for some
time, while chicory and its substitutes will do so immediately.
Cocoa.—This is never sold in the pure state, and no two
preparations are alike. The only safeguard is to buy it in packets
bearing the name of one of the well-known makers, whose
preparations are wholesome and adapted to the demands of the
palate.
Pickles.—Pickles and preserved vegetables are often coloured
highly by the addition of copper or by boiling the articles in copper
vessels. The presence of copper, even in very small proportion, can
be easily and rapidly detected by plunging a bright knife-blade into
the vessel for a few moments, when, if copper be present, it will
coat the knife. Another evil in cheap pickles is the adulteration of the
vinegar by means of sulphuric and other acids, generally sulphuric,
that being one of the cheapest. A very small addition of sulphuric
acid can be detected by pouring a few drops of the vinegar on a
small piece of lump sugar and then evaporating the vinegar away on
a water bath; the residue will become more or less blackened
(carbonised) according to the amount of free mineral acid present.
(Hassall.) A water bath can be extemporised out of a china tea-
saucer placed on a small saucepan in which water is boiling. A
further risk in vinegar containing sulphuric acid is that the acid has
been made from pyrites and is contaminated with arsenic.
Pepper.—Pepper-corns may readily be judged by tasting; they
cannot easily be replaced by other seeds, but may have been
damaged by sea water and retain but little pungency. Ground pepper
is often adulterated with flour or starch, whose presence is at once
revealed by the microscope. The same may be said of most spices.
Obviously the housewife cannot conduct a critical chemical
analysis of any article coming into her household; the most she can
do is to detect the presence of inferior or injurious goods. Where
analyses are desired, the author will provide them on the terms
stated below, on samples being sent to the publishers of this
volume, with the necessary instructions:—

1. Chemical and microscopical examination of water,


£2 2 0
each sample
2. Chemical examination of bread, flour, lard, butter,
jam, marmalade, sauces, ale, wine, spirits, for 1 1 0
adulteration only, each sample
3. Chemical examination of milk, coffee, tea, spices,
pickles, and sweetmeats, for adulteration only, each 0 10 6
sample

Cleaning and Renovating.—This is a wide and important


subject, embracing not only the person and personal attire, but also
the furniture and fittings of the dwelling and the various utensils of
the household. Classification is adopted as far as possible.
Chip or Straw Goods.—To Clean.—Wash in warm soap liquor, well
brushing them both inside and out; then rinse in cold water, and
they are ready for bleaching.
To Bleach.—(a) Put a small quantity of salts of sorrel (oxalic acid)
into a clean pan, and pour on it sufficient scalding water to cover the
bonnet or hat. Put the bonnet or hat into this liquor, and let it remain
in it for about 5 minutes; to keep it covered, hold it down with a
clean stick. Dry in the sun or before a clear fire. (b) Having first
dried the bonnet or hat, put it, together with a saucer of burning
sulphur, into a box with a tight-closing lid. Cover it over to keep it in
the fumes, and let it remain for a few hours. The disadvantage of
bleaching with sulphur is that the articles so bleached soon become
yellow, which does not happen to them when they are bleached by
oxalic acid.
To Finish or Stiffen.—After cleaning and bleaching, white bonnets
should be stiffened with parchment size. Black or coloured bonnets
are finished with a size made from the best glue.
Straw or chip plaits, or leghorn hats and bonnets, may also be
cleaned, bleached, and finished as above.
Feathers.—(a) To clean feathers from their own animal oil, steep
them in 1 gal. water mixed with 1 lb. lime, stir them well, then pour
off the water, and rinse the feathers in cold spring water. To clean
feathers from dirt, simply wash them in hot water with soap. Rinse
them in hot water. (b) To clean white ostrich feathers: 4 oz. white
curd soap cut small, dissolved in 4 pints water, rather hot, in a basin.
Make the solution into a lather by beating it with birch rods, or
wires. Introduce the feathers and rub well with the hands for 5 or 6
minutes. After the soaping, wash in clean water as hot as the hand
can bear. Shake until dry. (c) Slightly soften the soiled feathers with
warm water, using a camel’s-hair brush. Next raise each feather with
a flat piece of wood or paper-knife, and clean them with spirits of
wine. Dry with plaster-of-Paris, and afterwards brush them carefully
with a dry camel’s-hair brush. (d) Make a strong solution of salt in
water, saturate a large and thick cloth with it. Wrap the bird up in
the damp cloth in as many folds as you can, not disarranging the
plumage. Look at the bird in 6 hours, and if not long dried on the
blood will be soft; if not soft, keep it in the cloth longer, and re-wet
it. When soft, rub out with gentle pressure, putting something hard
under each feather with blood on, and rubbing with the back of a
knife. Of course each feather must be done separately. (e) Col.
Wragge treated the soiled plumage of albatrosses, Cape petrel, &c.,
by simply washing the feathers in rain water, after the process of
skinning, and then laying a thick mixture of starch and water over
the portion to be cleansed. Next he laid the birds aside, and left
them till the plastering of starch had become thoroughly dry. He
then removed the dry plaster by tapping it, and found that the
feathers had become much cleaner. Old specimens may be cleaned
in this way. Feathers may be “set” by just arranging them naturally
with a needle or any pointed instrument. (f) White.—Dissolve 4 oz.
white soap in 2 qt. boiling water; put it into a large basin or small
pan, and beat to a strong lather with a wire egg-beater or a small
bundle of birch twigs; use while warm. Hold the feather by the quill
with the left hand, dip it into the soap liquor and squeeze it through
the right hand, using a moderate degree of pressure. Continue this
operation until the feather is perfectly clean and white, using a
second lot of soap liquor if necessary. Rinse in clean hot water to
take out the soap, and afterwards in cold water in which a small
quantity of blue has been dissolved. Shake well, and dry before a
moderate fire, shaking it occasionally that it may look full and soft
when dried. Before it is quite dry, curl each fibre separately with a
blunt knife or ivory paper-folder.
Coloured.—These are to be cleaned, and rinsed in warm and cold
water, as above, but not rinsed in blue water. Coloured feathers may
also be cleaned in a mixture of 1 part fresh gall and 3 of lukewarm
water, washing them in this mixture in the same manner as in the
soap liquor. But they will require more rinsing when done by this
method, in order to take off all smell of the gall. Dry and curl as
before.
Grebe.—Carefully take out the lining, and wash with warm water
and soap, as directed for white ostrich feathers, but do not shake
them until they are quite dry. Before re-making, carefully repair any
rents there may be in the skin.
To Purify Feathers for Beds, Pillows, &c.—Prepare a quantity of
lime water in the following manner: Well mix 1 lb. quicklime in each
gal. of water required, and let it stand until all the undissolved lime
is precipitated, as a fine powder, to the bottom of the tub or pan,
then pour off the clear liquor for use. The number of gallons to be
prepared will, of course, depend on the quantity of feathers to be
cleaned. Put the feathers into a clean tub, pour the lime water on
them, and well stir them in it until they all sink to the bottom. There
should then be sufficient of the lime water to cover them to a depth
of 3 in. Let them stand in this for 3 or 4 days, then take them out,
drain them in a sieve, and afterwards well wash and rinse them in
clean water. Dry on nets having a mesh about the same size as a
cabbage net; shake the net occasionally, and the dry feathers will fall
through. When they are dried, beat them well to get rid of the dust.
It will take about 3 weeks to clean and dry a sufficient quantity for a
bed. This process was awarded the prize offered by the Society of
Arts.
Fenders.—(a) Have your bright steel fenders and fire-irons well
rubbed with mercurial ointment, and leave all bright parts smeared
over with it; they will not rust while left all winter. (b) Rub them well
with sperm oil; after which some people put unslaked lime. Wrap the
fenders in paper to keep off dust. (c) Take a piece of raw mutton fat
(the loin fat is best) and melt it in front of the fire, and rub it thickly
all over the bright fenders and fire-irons, and then do them up in
several thicknesses of brown paper; you will find them free from rust
in the spring. The fat must be raw, not cooked, and melted just
enough to rub on.
Firearms.—(a) A good and simple way of cleaning and recolouring
the barrels and other metal parts of a double-barrel shot gun which
are quite rusty. Take the barrels from the stock, and put them in
clean cold water free from gritty matters. Attach the brush to the
washing-rod, and get out all adhering powder and residues; next
take tow and wash until the barrels are quite clean. If the parts have
rusted it will be necessary to use a little emery flour. Dry the barrels
with clean cotton rags, rubbing until the metal feels warm. Plug the
ports and muzzles securely, then cleanse the outside parts with a
strong alcoholic solution of caustic potash, aided, if necessary, with a
little emery flour and a soft rag. Rinse thoroughly in water, dry
thoroughly, warm, and while warm rub over every part with the
following preparation: pure (dry) zinc chloride, 1 oz.; antimony
nitrate, ¼ oz.; olive oil, 2 oz.; well rubbed down into a smooth
uniform paste. After ½ hour’s exposure, rub off excess of this paste,
and polish with clean soft rags. In warming the metal, avoid
overheating it so as to injure the temper.
(b) In the Volunteer service there are several fluids used, which
are composed of either turpentine, naphtha, petroleum, benzine, or
gasoline, about one-third, or according to fancy, with Rangoon oil.
But the instructions to the troops are—a damp rag, flannel or tow, is
all that is required to clean the barrel out; if much water is used, it is
liable to run into the action. The butt should be raised when washing
out. After washing out and drying, an oily rag or flannel to be used.
On many occasions the oily material will be found to be efficacious,
without the previous use of water.
(c) Easy method of cleaning guns and rifles when leaded.—If a
muzzle-loader, stop up the nipple or communication hole with a little
wax, or if a breech-loader insert a cork in the breech rather tightly;
next pour some quicksilver into the barrel, and put another cork in
the muzzle, then proceed to roll it up and down the barrel, shaking it
about for a few minutes. The mercury and the lead will form an
amalgam, and leave the barrel as clean and free from lead as the
first day it came out of the shop. The same quicksilver can be used
repeatedly by straining it through wash-leather; for the lead will be
left behind in the leather, and the quicksilver will be again fit for use.
(d) If the barrels have become leaded, wet the tow on the rod
with spirits of turpentine, as the latter enjoys the property of
removing any leading almost equally with quicksilver. Newark’s gun-
cleaning composition also answers admirably for this purpose, and
prevents rust. Paraffin will also be found useful where neither of the
foregoing can be obtained. Never touch the grooves of a rifle with
emery, as it will dull their edges, and, consequently, affect the
shooting power. (Land and Water.)
(e) Fill a stable-bucket one-third full of hot water. The water
should not be too hot—not hotter than the finger can bear. If
scalding hot, it is likely to cause the rib to start. Dismount barrels
from stock, and place breeches in the bucket. Pour some of the
water into the muzzles from a jug, and sponge the barrels out with a
woollen rag or tow until the water comes out perfectly clear, both at
the nipples and when jerked out of the muzzle by action of cleaning-
rod. Wipe the water off the exterior of the barrels, then dry the
interior with woollen rags; four or five changes of rag are required.
When the insides of the barrels are perfectly dry, pass an oiled rag
down. Remove fouling from nipples and adjacent parts by means of
a stiff brush or woollen rag. Any sharp instrument should on no
account be used. Oil out the barrels, being careful not to miss the
parts round the nipples, between rib and barrel, and ramrod bands.
Remove fouling from hammers in the same way as from the nipples.
Rub the hammers, trigger, trigger-guard, &c., clean with a dry
woollen rag, then rub them with an oiled one, which should be
passed all over the stock. Clean and oil the ramrod. The oil used
should be animal, not vegetable. Neat’s-foot oil (of the consistency
of grease) is excellent, never rusting the gun in the least. On
returning from a day’s shooting, if it is not convenient to clean the
gun at once, an oiled rag should be passed outside of the barrels
and stock.
Floorcloths and Carpets.—(a) Oilcloths.—In buying an oilcloth for a
floor, endeavour to obtain one that was manufactured several years
before; as the longer it has been made previous to use, the better it
will wear, from the paint becoming hard and durable. An oilcloth that
has been made within the year, is scarcely worth buying, as the
paint will be defaced in a very little time, it requiring a long while to
season. An oilcloth should never be scrubbed with a brush; but, after
being first swept, it should be cleaned by washing with a large soft
cloth and lukewarm or cold water. On no account use soap, or take
water that is hot; as either of them will certainly bring off the paint.
When it has dried, you may sponge it over with milk, which will
brighten and preserve the colours; and then wipe it with a soft dry
cloth. (J. R.)
(b) Wash with a large, soft, woollen cloth and lukewarm or cold
water, dry thoroughly with a soft cloth, and afterwards polish with
milk, or a weak solution of beeswax, in spirits of turpentine.
(c) Oilcloth may be improved in appearance by rubbing it with a
mixture of ½ oz. beeswax in a saucerful of turpentine. After being
applied it must be well rubbed with a dry cloth; otherwise the floor
will be quite slippery.
(d) Cleaning New Linoleum.—Equal parts of salad oil and vinegar
is the best thing for the purpose, as it keeps it clean longer than
skim milk, which is commonly used. If dirty, wash the linoleum first
with soap-and-water. Soda rapidly destroys it, but soap or grease
improves the wear.
(e) Oilcloth made from Carpet.—The following recipe is
communicated to the Cultivator and Country Gentleman by a
correspondent:—Nail the old Brussels carpet loosely to the floor, in a
large attic or wood-house chamber not in use. Then paint it over
with a thick coat of linseed oil and burnt umber. Let it dry in
thoroughly; add a coat of good varnish. Let that dry for a week or
two, and it can be washed with milk-and-water like any oilcloth.
Paint it on the wrong side, and nail it down closely, for it need not be
taken up for many years. As the varnish and paint wear off, renew
them, and thus it will last four times as long as common oilcloth. It
may be ornamented with a border of scarlet, green, or blue lines.
(f) Sweeping Carpets.—Before applying the broom, scatter over
the carpet the refuse tea-leaves from the teapot. These should be
set apart and saved in a pot kept for the purpose, squeezing the
water out thoroughly in the hand. First rub the leaves into the carpet
with the broom, and then sweep as usual. This will prevent dust,
and brighten the colours. Indian meal (maize flour) is recommended
for this purpose by many experienced American housekeepers. A
small sweeping machine, with a box to catch the dust, is now often
used.
(g) Cleansing Carpets.—Put 4 tablespoonfuls ammonia to 1
bucketful of water, with soap, scrubbing-brush, and cloth; scrub and
wash the carpet just as you would an unpainted floor, changing the
water frequently. Leave the windows open, and the carpet will soon
dry. In cities where bituminous coal is used, carpets are scrubbed as
regularly as wooden floors, and with happy effects. Instead of taking
up a carpet every 6 weeks during the winter, as some in muddy
districts think necessary, a careful wiping every week of the carpet
with a mop wrung from clean water will remove the dust and
brighten the colours. A thorough sweeping should precede this
wiping-up.
(h) Carpets may be washed on tables or on the floor. In either
case they must be taken up and well beaten and swept. Grease is
taken out by rubbing hard soap on the spot, and scrubbing it out
with a brush dipped in clean cold water. Each spot must be rubbed
dry with a cloth as it is washed. Dissolve a bar of soap in 2 gal.
water, by cutting it into the water and heating to a boil. Lay the
carpet on the floor and tack it down, or have a heavy board, 3 ft.
wide by 12 ft. long, laid on stout stands, or horses, and throw the
carpet over that, keeping a clean board or sheet underneath to
receive the carpet as it is cleansed. Provide brushes, and a quantity
of coarse cotton cloths, flannels, and a large sponge. Take 2 pails
filled with blood-warm water, put 2 qt. of the melted soap into one
of them to scour the carpet with, and use the other for rinsing. Dip
the brush in the soapsuds, and scour a square yard of the carpet at
a time, using as little water as possible, not to soak it through. When
the soap has done its work, rub it well out of the carpet with a
flannel or coarse sponge, sucking up with these all the wet and dirt
left by the brush, rinsing the article used in clean water repeatedly.
Have ready a pail of clean cold water, with enough sulphuric acid or
sharp vinegar in it to taste sour; dip a clean sponge in this, squeeze
and rub it well into the spot just cleansed. Afterward wipe dry with
coarse cloths, rinsing and hanging them where they will be dry when
the next yard is washed. Finish yard after yard in this way, rubbing
each clean and dry as you go. Keep a good fire in the room to dry
the carpet thoroughly. If scoured on a frame, nail the carpet against
the side of a house in the sun to dry. This is a tedious, but thorough
process. Hearth rugs may be cleaned in the same way, beating and
brushing them well, and tacking on a large board before washing.
Scrub one-sixth of it at a time unless you are expeditious, and dry
well with an old sheet. The secret of having carpets look well is to
wash and rinse them thoroughly, without soaking them through.
Ingrain, tapestry, Brussels, and Turkish carpets are all cleaned in this
way. Good authorities recommend a teacupful of ox-gall to a pail of
soapsuds, rinsing with clean water.
(i) Removing Grease Stain.—To take oil out of a carpet, as soon as
it is spilled put on plenty of wheat flour or whiting, to absorb the oil
and keep it from spreading. If the oil is near a seam, rip it, so that
the spot will not spread, and put whiting on the floor under the
carpet. Next day sweep up all the flour above and under the carpet
with a stiff brush, and put on plenty of fresh flour. To take out
grease spots, rub them with white flannel dipped in raw spirits of
turpentine. If they show after a while, rub again on both sides. If
there are grease spots on the floor, remove them with potters’ clay
before the carpet is laid down.
(j) Ditto.—Upon the grease stain lay a little damp fullers’ earth,
and, after standing for some time, rub it gently into the carpet, and
then wash off by using a little ammonia carbonate, and the colour
will be restored.
(k) Following are systems adopted by professional carpet cleaners.
All carpets and hearth-rugs, whether intended for dry or thorough
cleaning, must first be well beaten, and swept or brushed with a
hard broom. A carpet, to be properly beaten, should be hung on a
stout line, the wrong side outwards, and well beaten by two or more
persons, according to its size, some standing on one side and some
on the other. The sticks used should be pliable, and well covered at
the ends with cloth in the form of a knot in order to prevent the
carpet being torn or the seams split by the sharp ends of the sticks.
After being thoroughly beaten on the wrong side, the carpet should
be turned and treated in the same manner on the right side.
Dry Cleaning.—Have ready a number of dry coarse cotton or linen
cloths, some coarse flannels, and one or more large pieces of coarse
sponge; two or more hard scrubbing or scouring brushes, some
large tubs or pans, and pails, and also a plentiful supply of both hot
and cold water.
First take out all grease spots; this may be effected in several
ways. Well rub the spot with a piece of hard soap, and wash out
with a brush and cold water, and well dry each spot before leaving it.
Or use, instead of the soap, a mixture of fullers’ earth, gall, and
water, well rinsing and drying each spot as before. When this has
been done, the carpet may be cleaned by one of the three following
methods:—
(1) With Soap Liquor.—Cut up a bar of soap and dissolve it over a
fire in 2 gal. water. Put 2 qt. of this dissolved soap into a pail of
warm water. Dip a scrubbing-brush into this soap liquor, and scour
with it about 1 sq. yd. of the carpet; be careful not to let the liquor
soak through to the back. When this piece is thoroughly cleaned, rub
the soap well out of it by means of a coarse flannel or sponge,
sucking up all the wet and dirt made by the brush; rinse the flannel
or sponge frequently in warm water. Now take a clean sponge and
dip it into a pail of common sour, squeeze it out, and then rub the
sour well into the part just cleaned and rinsed. Rub as dry as
possible with clean, coarse cotton or linen cloths before proceeding
with the cleaning. The whole carpet is to be cleaned, spirited, and
dried in the same manner, a square yard at a time.
(2) With Gall.—Put a bag of very fresh bullocks’ gall into a pail
containing 2 gal. cold water, with 4 oz. pearlash dissolved in it, and
well mix it either with a stick or your hands. Have ready, besides
this, 2 pails cold water, a large sponge, a couple of flannels, and
some dry, coarse cloths. Dip the brush into the gall and water, and
scrub the carpet, a square yard at a time, as quickly and as carefully
as possible. Rinse, and suck up the gall and dirt with a large flannel
or sponge, which is to be frequently rinsed in the pails of cold water.
Well dry with cloths before beginning a second square.
By adopting this simple process, any carpet, whatever its size,
may easily be cleaned on the floor; the process is especially useful
when the carpet is not very dirty, or when it contains delicate
colours, as the gall cannot possibly injure them. The only objection
to this method is that when cleaned with gall there is often a
disagreeable smell left in the carpet; but if the gall be obtained from
a fresh-killed bullock, and the carpet, after cleaning, be hung for a
few hours in a current of fresh air, the whole of this smell will go off.
(3) With Ammonia.—Dissolve in a small pan 1 oz. pearlash in hot
water, and mix with it 1 gal. ammonia, which must be obtained from
a drysalter, not from a chemist. Dip a sponge or coarse flannel into
the ammonia, take it out rather wet, and well rub it into the carpet,
then dip the scouring-brush into the liquor and well scour the part
already sponged as quickly as possible. The dirt and ammonia must
then be sucked up in the sponge or flannel, and the part well dried
with flannels and cloths before proceeding with the next. Each
square yard will take about 20 minutes to clean and dry thoroughly.
This is another very simple method, the only objection to it being
that the carpet will smell of the ammonia for some time if it is kept
in the room in which it has been cleaned; it should therefore be
hung for 3 or 4 days in the open air or under an open shed, taking
care, however, that it does not get wet.
In dry cleaning, special care must be taken not to allow the liquor
to soak to the back of the carpet or rug; and also that, before
commencing, the floor or board on which the operation is
conducted, is perfectly dry. A good fire should also be kept in the
room during the whole time, as much of the success of the operation
depends on rapid drying.
Floors.—(a) First sweep well. Have a small tub or bucket of warm
water; an old saucer to hold a piece of brown soap; a large thick
tow-linen floorcloth; and a long-handled scrubbing-brush. Dip the
whole of the floorcloth into the water, and with it wet a portion of
the floor. Next, rub some soap on the bristles of the brush, and
scrub hard all over the wet place. Then dip your cloth into the water,
and with it wash the suds off the floor. Wring the cloth, wet it again,
and wipe the floor with it a second time. Lastly, wash the cloth about
in the water, wring it as dry as possible, and give the floor a last and
hard wiping with it. Afterwards go on to the next part of the floor,
wet it, scrub it, wipe it 3 times, and proceed in the same manner, a
piece at a time, till you have gone over the whole; changing the dirty
water for clean, whenever you find it necessary. For a large room,
fresh warm water will be required 4 or 5 times in the course of the
scrubbing. When the floor has been scrubbed, leave the sashes
raised while it is drying. For scouring common floors that are very
dirty, have by you an old tin pan with some grey sand in it; and after
soaping the brush, rub it on some sand also. Always commence
operations at the corner farthest from the door and work towards
the door.
(b) Take some clean, sifted, white or silver sand, and scatter it on
the floor. Dissolve 1 lb. potash or pearlash, in 1 pint water, and
sprinkle the sand with this solution. Have a pail of very hot water,
and well scrub the boards lengthwise with a hard brush, and use the
best mottled soap. Change the water frequently. The potash, if
applied as directed, will take out all stains. Ink stains may be
removed from boards by using either strong vinegar, or salts of
lemon.
(c) The following will be found useful in cleaning and restoring
colour to wooden floors:—1 part calcinated soda allowed to stand ¾
hour in 1 part slaked lime; then add 15 parts water, and boil. Spread
the solution, thus obtained, upon the floor with a rag, and after
drying, rub with hard brush and fine sand and water. A solution of 1
part concentrated sulphuric acid and 8 parts water will enliven the
wood after above application. When dry, wash and wax the floor.
(d) Remove ink from floors by scouring them with sand wet with
water and a little oil of vitriol, mixed. Then rinse them with strong
saleratus water (potassium bicarbonate).
(e) Take ¼ lb. fullers’ earth and ¼ lb. pearlash, and boil together
in 1 qt. water, and, while hot, spread it on the greased surface,
allowing it to remain 14 or 15 hours; after which it may be scoured
off with sand and water.
(f) Procure some good light benzoline, scrub the stained portion
with a hard brush dipped in this, then wipe with a dry flannel. Make
a strong solution of common washing soda in hot water, place a little
unslaked lime, broken into coarse powder, over the stains, and pour
on sufficient solution of soda to wet the lime thoroughly. Leave this
mixture on for a short time, then scrub hard with plenty of clean hot
water, and wipe dry with clean flannel.
(g) A small quantity (say 2d. worth) oxalic acid (poison) dissolved
in ½ pint hot water; apply on a rag tied to a stick; wash off with
soda, soap, and water.
(h) Marks of tempera (whitewash) can be removed by a good
scrubbing with soap and water; oil stains require to be softened with
turpentine, and then scraped off. There is a soap called Philadelphia
Kitchen Crystal Soap, which removes oil stains rapidly; it must never
be put into water, but a damp flannel is rubbed on it, and the stains
are scrubbed with the lather. It also removes dirty marks on paint
quickly and easily.
Furniture.—(a) Scratches on furniture may be removed by rubbing
with a woollen rag dipped in boiled linseed oil. The article must then
be varnished with shellac dissolved in alcohol.
(b) To clean and restore the elasticity of cane chair-bottoms.—Turn
the chair bottom upwards, and with hot water and a sponge wash
the canework well, so that it is well soaked; should it be dirty, use
soap; let it dry in the air, and it will be as tight and firm as new,
provided none of the canes is broken.
(c) Straw Matting.—Wash it with weak salt and water and dry it
well, or boil a small bag of bran in 2 gal. water, and wash the
matting with the water, drying it well.
(d) Ink Stains out of Mahogany.—Put a few drops of spirits of nitre
(nitric acid) in a teaspoonful of water, touch the spot with a feather
dipped in the mixture, and on the ink disappearing, rub it over
immediately with a rag wetted in cold water, or there will be a white
mark, which will not be easily effaced.
(e) Ditto.—Apply spirits of salts (muriatic acid) with a rag until the
spots disappear, and immediately afterward wash with clear water.
(f) Ditto.—To ½ pint soft water put 1 oz. oxalic acid, and ½ oz.
butter (terchloride) of antimony; shake well; when dissolved, it will
be very useful in extracting stains from mahogany, as well as ink, if
not of too long standing.
(g) Furniture creams or French polishes.—These are better bought
than home made. Nearly 100 good recipes exist, and maybe found
in ‘Spons’ Mechanic’s Own Book.’
Furs, Skins, and Rugs.—(a) Fur.—Soap or water will spoil it. Get
some clean common whiting—powdered, and plenty of it—put it in a
damp place for a day or so, but on no account let it get wet; rub it
into the fur with the hand, and don’t be afraid to rub it. Now let it
stop till next day, give it another good rubbing, then shake out all
the whiting you can, and give it a good brushing with a clothes-
brush. It will now be pretty clean, except the skin at the bottom of
the fur. To remove the dirt from thence get the fur over the back of a
chair, and use the point of the clothes-brush very briskly, at the
same time giving a short puff of wind every time you give a stroke
with the brush. With a little patience you will remove every trace of
whiting, grease, or dirt. Lastly, pour a little spirits of wine on a plate,
dip the point of the clothes-brush in this, and lightly pass it over the
fur; move the brush the same way as the fur runs.
(b) Ditto.—Take equal parts of flour and powdered salt (which
should be well heated in an oven), and thoroughly rub the fur. It
should afterwards be well shaken, to free it from the flour and salt.
(c) Ditto.—Lay the fur on a table, and rub it well with bran made
moist with warm water. Rub until quite dry, and afterwards with dry
bran. The wet bran should be put on with flannel, and the dry with a
piece of book muslin.
(d) Ditto.—Thoroughly sprinkle every part with hot plaster-of-Paris,
and brush well with a hard brush. Then beat it with a cane, comb
smooth with a wet comb, and press carefully with a warm iron;
when dry, shake out all loose plaster-of-Paris.
(e) Hearth-rugs.—Hearth-rugs should never be cleaned on the
floor, but on a large scouring board, and should only be operated
upon ⅙ of their length at a time. After being cleaned, they require
to be dried very quickly; as otherwise, on account of the thickness of
the pile, they are apt to sadden. Hearth-rugs may be cleaned by
either the first or second methods given for dry-cleaning carpets;
with the following exception, that when the first method is adopted,
only 1 lb. soap dissolved in 1 gal. hot water will be required. After
the rug is finished, dip a clean sponge into a pail containing a little
common sour, and well rub it into the face of the rug.
(f) Sheepskin Rugs and Mats.—Dissolve 1 bar soap in 2 gal. boiling
water. Put 2 qt. of this into a tub or pan containing about 2 gal.
warm water. First rub out the dirt and grease spots with the strong
soap liquor, or, if necessary, with fullers’ earth. Then put the rug or
mat into the tub containing the weak soap liquor, and well wash and
punch it. Throw away this first liquor, and mix another lot with the
same proportions of warm water and dissolved soap, and again well
wash the rug; and so continue until it is perfectly clean. Then rinse
well in cold water to take out all the soap, and afterwards in cold
water in which a small quantity of blue has been dissolved. This blue
water will only be required for white skins. After this has been done,
the mat or rug should be wrung out, shaken, and hung to dry with
the skin side towards the sun, but not when the heat is scorching, or
the skin will become hard and brittle. It should, while drying, be
frequently shaken and hung up first by one end and then by the
other.
(g) Ditto.—Wash while fresh in strong soapsuds, first picking from
the wool all the dirt that will come out. A little paraffin, 1
tablespoonful to 3 gal. water, will aid in removing the impurities.
Continue to wash the skin in fresh suds till it is white and clean.
Then dissolve ½ lb. each of salt and alum in 3 pints boiling water,
put into it water enough to cover the skin, which should soak in the
solution 12 hours, and then be hung on a line to drain. When nearly
dry, nail it, wool side in, on a board, or the side of a barn, to dry.
Rub into the skin 1 oz. each of pulverised alum and saltpetre, and if
the skin is large double the quantity. Rub for an hour or two. Fold
the skin sides together, and hang the skin away for 3 days, rubbing
it every day or till perfectly dry. Then with blunt knife clear the skin
of impurities, rub it with pumice or rottenstone, trim it into shape,
and you have a door-mat that will last a lifetime. If it is to be dyed,
have a shallow vessel as large as the skin in which to prepare the
dye, so that the skin can be laid wool-side down smoothly into the
vessel that all parts may be equally immersed in the dye. This should
not be more than an inch deep, otherwise the skin might be injured
by the hot dye. After colouring, again stretch the skin to dry, and
then comb with a wool- or cotton-card.
Glass Articles.—(a) Mirrors.—Wet the surface of the glass with gin,
to remove the stains. Then rub with a cloth dipped in powdered
blue. Polish with a silk handkerchief. Be very careful not to touch the
frames.
(b) Ditto.—To clean glass in frames, when the latter are covered or
otherwise so finished that water cannot be used, moisten tripoli with
brandy, rub it on the glass while moist, and when dry rub off with a
silk rag; to prevent the mixture injuring the cloth on the frame, use
strips of tin bent to an angle; set these on the frame with one edge
on the glass; when the frames are of a character that will not be
injured by water, rub the glass with water containing a little liquid
ammonia, and polish with moist paper.
(c) Ditto.—Take part of a newspaper, fold it small, dip it in a basin
of clean cold water, and when it is thoroughly wet squeeze it out as
a sponge, and then rub it hard over the face of the glass, taking care
that it is not so wet as to run down in streams. After the glass has
been well rubbed with the wet paper, let it rest a few minutes and
then go over it with a fresh dry newspaper, till it looks clear and
bright, which it will do almost immediately.
(d) Windows.—Procure a washleather of convenient size and some
“paper-hanger’s” canvas; 2 yd. divided into 3 pieces, will be a nice
size to work with. Have the cut sides hemmed, and they will last a
long while. When it is desired, use one; boil or soak for an hour or
so in a solution of soda and water to get out the “dress”; then wring
out, and rinse in as many courses of clean water as you like; then
partially dry (practice will enable you to judge), fold to a convenient
size, and it will be ready for use. The soda solution will now be cool
enough for the leather (if too hot it will shrivel the leather); wash in
the same manner, and wring superfluous moisture out; then wash
the glass thoroughly with it and plenty of elbow-grease, and polish
off with the canvas.
(e) Ditto.—One of the best materials is a mixture of calcined
magnesia with enough purified benzin to produce, when shaken up,
a thick milk. It should be kept in vessels provided with well-ground
glass stoppers. For use, a small quantity of the mixture is applied to
a muslin rag, or better, to a wad of cotton, and the windows are
rubbed with this. It may be very readily cleaned off without leaving
any deposit in the corners.
(f) Glass Globes.—Rub inside with a little wet pumice-powder on a
cloth, and in 2 minutes you would not know that they were not
newly purchased. The best way to cleanse dirty glass of all kinds is
to put a small quantity of spirits of salts (hydrochloric acid) into a
basin of water, and to place the dirty articles in the liquid for a few
minutes, when it will be found that the glass is clean, and only
requires drying. If very dirty, the globes may require to stay in the
liquid a little longer. This plan is very useful for cleaning the pendant
drops of glass chandeliers, water bottles, &c., as no soap is required.
Care must be taken not to drop the undiluted spirits of salts on the
clothes or hands.
(g) Photographic Glass Plates.—One of the most powerful—if not,
indeed the most powerful—detergents for refractory plates is the
mixture of sulphuric acid and bichromate of potash recommended by
Carey Lea some years ago. It is especially useful with glasses which
have been frequently used, or which from the nature of the
treatment they have undergone resist the action of both acids and
alkalies completely. Its utility is dependent upon the powerful action
of chromic acid upon organic matter, and we have never yet met
with a plate which did not succumb to its treatment. One precaution
is necessary in using it, however; it must be carefully removed from
the glass by copious washing as soon as possible after it has done
its duty. If allowed to soak for some time, as is frequently the
practice, the plates appear to absorb the solution (the penetrating
power of which is extraordinary), or an insoluble compound becomes
firmly attached to the surface and stedfastly refuses to be displaced.
Though generally invisible, it results in a peculiar mottled
appearance between the glass and the developed film which entirely
ruins the picture. We recently treated a number of plates which had
become useless from this cause with various detergents, including
acids as well as alkalies, but to no purpose; friction with various
abrading powers failed to remove the defect, and we were well-nigh
compelled to give it up. Remembering, however, that cyanide of
potassium has been utilised by carbon printers for the purpose of
reducing the strength of over-printed proofs—which it does by virtue
of its action upon the insoluble compounds of chromium—we
resolved to try its efficacy on our refractory plates, when all the
mottling disappeared as if by magic. Those amongst our readers
who dare to fly in face of all that has been lately written upon the
dangers attending cyanide and bichromate of potash have here a
“wrinkle.” Surely those who have dared bichromate will not fear the
minor dangers of cyanide. (Brit. Jl. Phot.)
(h) Ditto.—A cream of tripoli powder and spirits of wine, with a
little ammonia added, is a very good solution for cleaning glass
plates. Old collodion is also very good; it should be thinned down
with an equal bulk of spirits of wine; add an excess of iodide of
potassium, and shake till the solution is saturated. Caustic potash is
very good; so is carbonate of soda. If the plates be new, and
covered with little gritty particles which do not come off on the
application of potash, they may be removed with nitric acid.
(i) Ditto.—Take a dilute solution of potash permanganate, and
pour on enough to wet the sides of the vessel to be cleaned. A film
of hydrated manganic oxide is deposited, which is then rinsed with
hydrochloric acid. Chlorine is formed, which acts in the nascent state
on the organic matter, which becomes readily soluble. The
permanganate solution can be used again and again till its oxidising
power is exhausted. (Walz.)
(j) Ditto.—Dissolve 15 gr. potassium iodide in 5 oz. water and 5 oz.
alcohol, afterwards adding 3 gr. iodine and enough whiting or
rottenstone to make a creamy paste Rub a little of this on the glass
with a rag until clean, then polish with a cloth. (J. Hughes.)
(k) Glass Slides.—“I had tried previously to remove the hardened
balsam in many ways, and had succeeded fairly with a mixture of
prepared chalk, methylated spirit, and liquid ammonia, but found
this objectionable because it was such a dirty job. I now simply
warm the slides over a flame, and push off the covers into strong
sulphuric acid (oil of vitriol), and leave them therein for a short time;
when clean, drain off, and rinse with a little fresh acid, and finish off
by washing well in water. As much balsam as possible is removed
from the slides by scraping with a knife, and then sulphuric acid is
rubbed upon them with a glass rod. They are then well washed. If
necessary, a finishing touch may be given with a warm solution of
washing soda or methylated spirit and ammonia, to remove all trace
of grease. Sulphuric acid should be added to water, or water to
sulphuric acid, very gradually.” (Thos. H. Powell.)
(l) Removing Grease.—Dissolve soda carbonate in water, in the
proportion of 1 of the former to 10 of the latter, and let the liquid
boil in a clean untinned iron pot. Slake 8 parts quicklime in a covered
vessel and add the hydrate thus formed to the boiling liquid, stirring
it meanwhile. Great care must be exercised in using this caustic
solution, which must not be allowed to touch the hands; the glass
must therefore be dipped in it by the aid of tongs or pliers. When
the grease is dissolved, the glass is to be well brushed and
subsequently rinsed in water.
(m) Removing Paint Stains.—3 parts potash, 1 oz. caustic lime; lay
on with a padded stick and let remain some hours.
(n) Ditto.—Moisten with washing soda dissolved in warm water;
renew for ½ hour; wash off with clean water.
(o) Bottles.—If oily or otherwise greasy, they should not be
washed with water, but wiped with dry tow, or a dry dirty cloth, so
as to remove as much grease as possible. By changing the cloth for
one that is clean, the vessel can be wiped until all traces of grease
disappear.
(p) Ditto.—A strong solution of an alkali, such as pearlash, may be
used, whereby the removal of the grease is materially facilitated.
(q) Ditto.—If soiled by resin, turpentine, resinous varnishes, &c.,
wash with a strong alkaline solution, and rub by means of the wire
and tow.
(r) Ditto.—If the alkali fail to act, a little sulphuric acid may be
employed with advantage. The latter acid will also be found
advantageous in removing pitch and tar from glass vessels. Nitric or
sulphuric acid may be employed to clean flasks which have
contained oil.
(s) Ditto.—“To clean a silver-bottle, pour in a strong solution of
potassium cyanide; shake a few times, pour out, and rinse with
water 2 or 3 times, and your bottle is perfectly clean. Keep the
solution, and filter and strengthen when required. By doing this you
can sun your bath better in 2 hours than in a week’s exposure in the
dirty black bottles photographers appear to delight in.” (Phil. Phot.)
(t) Ditto.—Alexander Müller, of Berlin, after speaking of the various
methods in vogue for cleaning glass vessels, as, for example, sand
(which is objectionable, as it scratches glass), shot (good, but should
be followed by a wash of dilute nitric acid, to get rid of lead),
brushes, copper scale (also good, but requires subsequent rinsing
with some dilute acid), bits of paper or linen, wood ashes, salt
(especially rock-salt), gypsum and marble-dust (very good), ground
bones (likewise excellent), he concludes as follows:—Chisel or
tongue-shaped pieces are cut from thick pieces of indiarubber, and a
sharp brass or platinum wire is fixed into the thick end to serve as a
handle. With this washer and its flexible handle, we are able to “lick”
out, to a certain extent, any kind of a bottle. For beakers and
capsules, we greatly prefer it to the hair pencil and feather
commonly used; for, owing to their fibrous structure, the precipitate
gets entangled in them, while they also lose some of their
nitrogenous particles, which would affect the accuracy of careful
nitrogen determinations, as, for example, in water analyses. Finally,
to clean glass or porcelain vessels from the greatest variety of
adherent organic substances, he recommends a mixture of
bichromate of potassium and sulphuric acid as superior to ether,
alcohol, benzine, &c.
(u) Bottles which have contained petroleum, wash with thin milk
of lime, which forms an emulsion with the petroleum, and removes
every trace of it; by washing a second time with milk of lime and a
small quantity of lime chloride, even the smell may be so completely
removed as to render the vessel, thus cleansed, fit for keeping beer
in. If the milk of lime be used warm, instead of cold, the operation is
rendered much shorter. (Ding. Pol. Jl.)
(v) Decanters.—There is often much difficulty experienced in
cleaning decanters, especially after port wine has stood in them for
some time. The best way is to wash them out with a little pearlash
and warm water, adding a spoonful or two of fresh slaked lime if
necessary. To facilitate the action of the fluid against the sides of the
glass, a few small cinders may be used.
(w) Ditto.—Soak the decanters for some hours in warm soda and
water; if there is much cutting on the outside, a brush will be
necessary to remove the dirt and stains from the crevices. Cut a
potato into small dice, put a good handful of these into the decanter
with some warm water, shake the decanter briskly until the stains
disappear; rinse in clean cold water, and let them drain until dry.
Vinegar and sauce cruets can be cleaned in the same way.
Gloves.—Kid. (a) Make a strong lather with curd soap and warm
water; lay the glove flat on a board, the bottom of a dish, or other
unyielding surface; dip a piece of flannel in the lather and well rub
the glove with it till all the dirt is out, turning it about so as to clean
it all over. Dry in the sun or before a moderate fire. When dry they
will look like old parchment, and should be gradually pulled out and
stretched. (b) Have a small quantity of milk in a cup or saucer, and a
piece of brown Windsor or glycerine soap in another saucer. Fold a
clean towel or other cloth 3 or 4 times thick, and spread the glove
smoothly on the cloth. Dip a piece of flannel in the milk, and rub it
well on the soap. Hold the glove firmly with the left hand, and rub it
with the flannel towards the fingers. Continue this operation until the
glove, if white, appears of a dirty yellow; or, if coloured, until it looks
dirty and spoiled, and then lay it to dry. Gloves cleaned by this
method will be soft, glossy, and elastic. (c) French method: Put the
gloves on your hands and wash them in spirits of turpentine until
they are quite clean, rubbing them exactly as if washing your hands;
when finished, hang them in a current of air to dry and to take off
the smell of the turpentine. (d) Eau de Javelle, 135 parts; ammonia,
8; powdered soap, 200; water, 150. Make a soft paste, and use with
a flannel.
Washleather. (e) Take out the grease spots by rubbing with
magnesia or with cream of tartar. Then wash with soap dissolved in
water as directed for kid gloves, and afterwards rinse, first in warm
water and then in cold. Dry in the sun, or before the fire.
Buckskin.—(f) To ¼ lb. Paris white add the same quantity of
scraped pipeclay and 3 oz. best isinglass; boil all well down, stirring
the while. Put the compound on thick, and, when dry, beat it well
out by clapping your hands together, &c.; then carefully iron the
gloves with a hot smoothing-iron. (g) When dirty, wash 3 times in
clean warm (not hot) “soap lather.” Put a little blue in, wring them
well, then put them in as good a form as you can—as nearly what
they should be when dry as practicable. When nearly dry, but
sufficiently damp to form to the hand, put them on; if difficult to get
on, damp a little; then press or push them off, and when dry (from
the fire) they will be as good as new, and white and clean, and not
mark anything. (h) 1 oz. gum arabic to 1 lb. white lead (powder),
free from lumps, to be well dissolved and strained through muslin;
afterwards mix your lead stiff and put it by until perfectly hard. Be
very careful not to leave water in the box or sponge after using. (i)
Take ½ lb. prepared chalk, ½ lb. prepared alum, 3 cakes pipeclay,
½ oz. oxalic acid, ½ oz. isinglass, 1 oz. powdered pumice, 1
tablespoonful starch, 6 tablespoonfuls sweet oil, 2 oz. white soap. To
be mixed in boiling water; the oxalic acid and prepared alum to be
added last.
All gloves are better and more shapely if dried on glove trees or
wooden hands.
Hands.—The hands are apt to be stained or tainted by contact
with many substances in everyday use. The following are most
common.
Tar. (a) Rub with fresh orange or lemon peel.
(b) Mix together pulverised extract of liquorice and oil of aniseed
to the consistency of thick cream; rub on thoroughly with the hand,
then wash off with soap and warm soft water.
Disagreeable Odours. (c) Ground mustard, mixed with a little
water, is an excellent agent for cleansing the hands after handling
disagreeably or strongly odorous substances, such as cod-liver oil,
musk, valerianic acid and its salts. Scale-pans and vessels may also
be readily freed from odour by the same method. (Schneider.)
(d) All oily seeds, when powdered, answer for this purpose. Flax-
seed meal, for instance, removes odours as well as mustard. The
use of ground almond-cake as a detergent is well known. The
explanation of this action is somewhat doubtful, but it is not
improbable that the odorous bodies are dissolved by the fatty oil of
the seed, and emulsionised by the contact with water. In the case of
bitter almonds and mustard, the development of ethereal oil, under
the influence of water, may perhaps be an additional help to destroy
foreign odours. The author also mentions that the smell of carbolic
acid may be removed by rubbing the hands with damp flax-seed
meal, and that cod-liver-oil bottles may be cleansed with a little hot
sesamé or olive oil. (Huber.)
Silver Nitrate. (e) Wash in solution of 10 parts potassium iodide, 1
iodine, 1 ammonia, in 100 water. (Liesegang.)
(f) Wash in strong solution of cupric chloride, and, about a minute
later, in soda hyposulphite. (Underwood.)
Nitric Acid. (g) Wash immediately and put on some lime chloride.
(h) On the stain or stains place sufficient caustic soda (the usual
reagent strength) with the end of the stopper (if the stain is all
covered it will do); gently rub it with any solid for a few seconds,
then wash it off; then gently rub the spot with a finger nail, when it
will come off almost completely; put on a little dilute hydrochloric
acid, when the spot will disappear entirely. If not, repeat the whole
process, which will be sure to remove it without the least injury to
the hand.
(i) Wash the hands in a solution of soda-ash and bleaching
powder, add the solution of soda-ash to the bleaching liquor as long
as a precipitate forms, then wash; the remaining stains will wear off
in time. Wash in this daily till the stains are completely removed.
Potassium Bichromate. (k) Rub the stains with a solution of
sulphurous acid, and subsequently wash with distilled or soft water.
(l) To a warm, strong solution of soda hyposulphite add a small
quantity of sulphuric acid; this may then be used on the stains with
similar effect. (Photo. News.)
Ivory and Bone Articles.—(a) Spirit of turpentine is very efficacious
in removing the disagreeable odour and fatty emanations of bones
or ivory, while it leaves them beautifully bleached. The articles
should be exposed in the fluid for 3 or 4 days in the sun, or a little
longer if in the shade. They should rest upon strips of zinc, so as to
be a trifle above the bottom of the glass vessel employed. The
turpentine acts as an oxidising agent, and the product of the
combustion is an acid liquor which sinks to the bottom, and strongly
attacks the ivory if allowed to touch it.
(b) Make a thick puddle of common whiting in a saucer. Brush well
with a tooth-brush into the curved work. Brush well out with plenty
of clean water. Dry gently near the fire. Finish with a clean dry hard
brush, adding one or two drops (not more) of sweet oil.
(c) Mix about a tablespoonful of oxalic acid in ½ pint boiling water.
Wet the ivory over first with water, then with a tooth-brush apply the
acid, doing one side at a time, and rinsing; finally dry in a cloth
before the fire, but not too close.
(d) Take a piece of fresh lime, slake it by sprinkling it with water,
then mix into a paste, which apply by means of a soft brush,
brushing well into the interstices of the carving; next set by in a
warm place till perfectly dry, after which take another soft brush and
remove the lime. Should it still remain discoloured, repeat the
process, but be careful neither to make it too wet nor too hot in
drying off, or probably the article might come to pieces, being most
likely glued or cemented together. If it would stand steeping in lime
water for 24 hours, and afterwards boiling in strong alum water for
about an hour and then dried, it would turn out white and clean.
Rubbing with oxide of tin (putty powder) and a chamois leather, will
restore a fine gloss afterwards.
(e) Well clean with spirits of wine, then mix some whiting with a
little of the spirits, to form a paste, and well brush with it. It is best
to use a rubber of soft leather where there are no delicate points;
put a little soap on the leather, and dip into the paste and rub the
ivory until you get a brilliant polish, finish off with a little dry whiting;
the leather should be attached to flat wood surface, and rub briskly.
(f) When ivory ornaments get yellow or dusky-looking, wash them
well in soap and water, with a small brush to clean the carvings, and
place them while wet in full sunshine; wet them 2 or 3 times a day
for several days, with soapy water, still keeping them in the sun;
then wash them again, and they will be beautifully white.
(g) Rub with soda bicarbonate applied on a tooth-brush dipped in
warm water.
Leather Goods.—(a) Carriage tops that have faded and become
grey can be restored by washing with a solution composed of 4 oz.
nut-galls, 1 oz. each of logwood, copperas, clean iron filings, and
sumach berries; put all but the iron filings and copperas in 1 qt. best
white wine vinegar, and heat nearly to boiling point; then add the
copperas and iron filings; let stand for 24 hours, and strain off the
liquid; apply with a sponge. This is equally good for restoring black
cloths.
(b) Enamelled leather tops that have been soiled by dust and rain
should be washed with soft water and Castile or crown soap. Apply
the water with a sponge and then scrub with moderately stiff brush;
cleanse with clean water and dry with a “shammy.” Never apply any
kind of oil or top dressing without first cleaning the leather.
(c) Mouldy Leather.—Remove the surface mould with a dry cloth,
and with another cloth apply pyroligneous acid.
(d) Russet Leather-covered Mountings.—Remove all stains and dirt
by rubbing the leather with a cloth and a little oxalic acid, and
restore the colour and finish by the use of salts of lemon (tartaric
acid) applied with a woollen cloth. Rub the leather until a good
polish is produced.
(e) Rubber-covered Mountings.—Rub the covered as well as the
metallic parts with a “shammy” and a little tripoli, and finish with a
clean woollen cloth.
(f) Chamois-leather.—Make a solution of weak soda and warm
water, rub plenty of soft-soap into the leather, and allow it to remain
in soak for 2 hours, then rub it well until it is quite clean. Afterwards
rinse it well in a weak solution composed of warm water, soda, and
yellow soap. If rinsed in water only, it becomes hard when dry, and
unfit for use. The small quantity of soap left in the leather allows the
finer particles of the leather to separate and become soft like silk.
After rinsing, wring it well in a rough towel, and dry quickly; then
pull it about and brush it well, and it will become softer and better
than most new leathers.
(g) Morocco Leather.—Strain well over a board, and scour with stiff
brush, using tepid water and soft-soap, made slightly acid with oxalic
acid; when done, unstrain the leather, and dry in a cool place; do
not saturate the leather, but keep the board inclined; when dry, rub
a little oil lightly over the surface with a rag.
(h) Saddles.—If much soiled, wash the leather with a weak
solution of oxalic acid and water, and, when dry, with the watery
portion of beef blood. The latter can be preserved by adding a little
carbolic acid, and keeping it in a bottle tightly corked.
(i) Brown saddles may be cleaned to look as well as new by the
use of tepid water and crown soap; if the latter cannot be had, use
pure Castile soap.
Marble, Stone, Plaster, &c.—Marble.—(a) Take finely powdered
pumice and vinegar; wash the surface with the mixture, and leave it
for several hours, then brush hard and wash clean. When dry, rub
with whiting and washleather. (b) Equal parts caustic potash,
quicklime, and soft-soap; make into a thick paste with water, and
apply with a brush; leave for about a week, and apply again and
again until the stain has disappeared. (c) 2 parts soda (carbonate), 1
of pumice, and 1 of finely powdered chalk. Mix into a fine paste with
water. Rub this over the marble, and the stains will be removed;
then wash with soap and water. (d) Wash thoroughly with soda and
warm water to remove any grease, and apply oxalic acid by laying a
piece of white cotton cloth saturated upon the spots for a short time.
If it destroys the polish, repolish with oxide of tin and water applied
with a cloth. If the stains are not deep, rub the surface only with the
oxalic acid and water upon a small piece of cloth quickly, and wash,
to free the marble of acid. Then, to give it a gloss, rub with chalk
wet with water. (e) Marble figures may be washed clean by putting
them out in a heavy shower. (f) Spots from sulphur and phosphorus,
caused by lucifer-matches, can be extracted from marble by carbon
bisulphide. (g) Removing rust from marble depends upon the
solubility of iron sulphide in a solution of potassium cyanide. Clay is
made into a thin paste with ammonium sulphide, and the rust-spot is
smeared with the mixture, care being taken that the spot is only just
covered. After a lapse of 10 minutes, this paste is washed off, and
replaced by one consisting of white bole mixed with a solution of
potassium cyanide (1:4), which is in its turn, washed off after a
lapse of about 2½ hours. Should a reddish spot remain after
washing off the first paste, a second layer may be applied for about
5 minutes. (h) Brush the dust off with a piece of chamois, then apply
with a brush a good coat of gum arabic about the consistency of
thick mucilage, expose it to the sun or wind to dry. In a short time it
will peel off. If all the gum should not peel off, wash it with clean
water and a clean cloth. If the first application does not have the
desired effect, it should be tried again. (i) Rub with the following
solution: ¼ lb. soft-soap, ¼ lb. whiting, 1 oz. soda, and a piece of
blue the size of a walnut; rub it over the marble with a piece of
flannel, and leave on for 24 hours, then wash off with clean water,
and polish the marble with a piece of flannel or an old piece of felt.
(j) Take 2 parts common soda, 1 of pumice, and 1 of finely
powdered chalk; sift through a fine sieve, and mix with water; rub it
well over the marble; then wash the marble over with soap and
water. (k) To take stains out of white marble, take 1 oz. ox-gall, 1 gill
lye, 1½ tablespoonfuls turpentine; mix, and make into a paste with
pipeclay; put on the paste over the stain, and let it remain for
several days. (l) To remove oil-stains, apply common clay saturated
with benzine. If the grease has remained on long, the polish will be
injured; but the stain will be removed. (m) Ironmould or ink-spots
may be taken out in the following manner: Take ½ oz. butter of
antimony and 1 oz. oxalic acid; dissolve in 1 pint rain-water; add
enough flour to bring the mixture to a proper consistency. Lay it
evenly on the stained part with a brush, and, after it has remained
for a few days, wash off, and repeat the process if the stain be not
wholly removed.
Stone.—(n) To remove grease from stone steps or passages, pour
strong soda and water boiling hot over the spot, lay on a little fullers’
earth made into a thin paste with boiling water, let remain all night,
and if the grease be not removed, repeat the process. Grease may
sometimes be taken out by rubbing the spot with a hard stone—not
hearth-stone—using sand and very hot water, with soap and soda.
Plaster.—(o) By means of Dutch rush or shave-grass (Equisetum
hyemale), or exceedingly fine sandpaper, the plaster must be rubbed
over in an equal manner, and in every part. The rubbing, being done
in a skilful manner, opens the pores of the plaster; then brush it over
with the thick oil used for moulding, which will give it a very pleasing
yellow tint, and at the same time great solidity. If, however, a white
colour is preferred, soak the cast, after the first operation has been
performed, in a stearine bath. If placed in a bath of hot stearine,
and allowed to remain 4 hours, it will acquire almost the solidity and
the polish of marble.
Alabaster.—(p) Make a paste with quicklime and water; spread this
well over the discoloured article, and leave on for about 24 hours;
then remove with soap and water, applying some friction on parts
which are worse than others. (q) If not too much discoloured, clean
with a strong lye of soap and water. (r) The superficial dirt and
grease having been removed, wash with diluted muriatic acid.
Metal Goods.—Brass.—(a) Wash with rock alum, boiled in a strong
lye in the proportion of 1 oz. to a pint; polish with dry tripoli. (b) The
government method prescribed for cleaning brass, and in use at all
the United States arsenals, is claimed to be the best in the world.
The plan is to make a mixture of 1 part common nitric acid and ½
part sulphuric acid, in a stone jar, having also ready a pail of fresh
water and a box of sawdust. The articles to be treated are dipped
into the acid, then removed into the water, and finally rubbed with
sawdust. This immediately changes them to a brilliant colour. If the
brass has become greasy, it is first dipped in a strong solution of
potash and soda in warm water; this cuts the grease, so that the
acid has free power to act. (c) Rub the surface of the metal with
rottenstone and sweet oil, then rub off with a piece of cotton flannel,
and polish with soft leather. (d) A solution of oxalic acid rubbed over
tarnished brass soon removes the tarnish, rendering the metal
bright. The acid must be washed off with water, and the brass
rubbed with whiting and soft leather. (e) A mixture of muriatic acid
and alum dissolved in water imparts a golden colour to brass articles
that are steeped in it for a few seconds. (f) First boil your articles in
a pan with ordinary washing soda, to remove the old lacquer; then
let them stand for a short time in dead aquafortis; then run them
through bright dipping ditto. Swill all acid off in clean water, and
brighten the relieved parts with a steel burnisher; replace in clean
water, and dry out in beech sawdust. Next place your work on stove
till heated, so that you can with difficulty bear your hand on articles,
and apply pale lacquer with brush: the work will burn if heated too
much or too rapidly. (g) Put a coat of nitric acid over the part you
want cleaned, with a piece of rag; as soon as it turns a light yellow,
rub it dry, and the brass will present a very clean appearance; if not,
repeat. (h) Oxalic acid and whiting mixed and applied wet, with
brush, and brushed again when dry with soft plate-brush to polish
with dry whiting. (i) The general idea is to use strong oil of vitriol or
a strong solution of oxalic acid. Now, these two substances are very
corrosive, and, although they undoubtedly clean the brasswork most
effectually, they do mischief in literally eating it away, so that
delicate engraving and fine edges soon disappear. In cases of brass
name-plates, these acids gradually insinuate themselves underneath
the black filling of the letters, generating gas, and forcing it up bit by
bit. The best thing to use is lemon pulp: the waste lemon from grog
or lemonade does excellently. It should be tied up in a piece of rag,
plum-pudding fashion, and when it becomes dry it should be dipped
in water. After the brasswork has been rubbed with the lemon it
should be well washed with water, and then finished off with
rottenstone and oil. One word about brass plates. There is no
greater eyesore to those who worship neatness than to see a rim of
worn-away paint round the brass plate on the hall door of an
otherwise well-appointed house. Such a defect may be easily
avoided by cutting out a piece of thick cardboard to the shape of the
plate, and covering over with it the paint surrounding the metal
during the process of cleaning. Another fatal mistake is to suppose
that the black letters require cleaning; they do not, and any efforts
in this direction only result in their being gradually worn away. (j)
Embossed Surfaces.—Make a mixture of 1 part nitric acid, 2 water,
and 6 hydrochloric acid. Boil the articles to be cleaned in a strong
soda-lye, and then leave them in the above solution, until they
become covered with a black layer. Remove from the mixed acids,
rinse in plenty of water, and use a fine scratch-brush to remove the
black mud. When clean, rinse in hot water, and dry in hot sawdust.
Articles thus treated acquire a brilliant lustre. To give a very rich
orange-yellow tone to the brass, the nitric acid may be replaced by
an equivalent weight of powdered alum. (k) Brass Instruments.—If
the instruments are very much oxidised or covered with green rust,
first wash them with strong soda and water. If not so very bad, this
first process may be dispensed with. Then apply a mixture of 1 part
common sulphuric acid and 12 of water, mixed in an earthen vessel,
and afterwards polish with oil and rottenstone, well scouring with oil
and rottenstone, and using a piece of soft leather and a little dry
rottenstone to give a brilliant polish. In future cleaning, oil and
rottenstone will be found sufficient. (l) Take a strip of coarse linen,
saturate with oil and powdered rottenstone, put round the tubing of
instrument, and work backwards and forwards; polish with dry
rottenstone. Do not use acid of any kind, as it is injurious to the
joints. To hold the instrument, get a piece of wood turned to insert
in the bells; fix in a bench vice. The piece of wood will also serve for
taking out any dents you may get in the bells. (m) Oil and
rottenstone for this purpose are, though very efficacious,
objectionable on account of dirt, on account of the oil finding its way
to the pistons, and because the instrument cleaned in this manner
so soon tarnishes. Dissolve some common soda in warm water,
shred into it some scraps of yellow soap, and boil it till the soap is all
melted. Then take it from the fire, and when it is cool add a little
turpentine, and sufficient rottenstone to make a stiff paste. Keep it
in a tin box covered from the air, and if it gets hard, moisten a small
quantity with water for use.
Scale-pans.—(n) Pour sufficient ammonia in the pan to cover the
bottom, and rub briskly till dry with a handful of dry pine sawdust.
For very dirty pans, take about 1 dr. potash bichromate, powder it in
a mortar, mix it with 2 or 3 times its bulk of concentrated sulphuric
acid, and add twice as much water. With this rub the pans (having a
care for the fingers), rinse well, and finish with rottenstone.
Brass or Copper.—(o) Mix together 1 oz. oxalic acid, 6 oz.
rottenstone, and ½ oz. gum arabic; all these are to be finely
powdered. Then add 1 oz. sweet-oil and sufficient water to form the
mixture into a paste. Apply a small portion to the article to be
cleaned, and rub dry with a flannel or washleather.
Bronze.—(a) For cleaning bronze statues, when blackened by
smoke and soot, wash with plenty of clean water, accompanied with
mechanical friction. Even this simple treatment is undesirable;
because the friction, however slight, accompanying the washing,
destroys, or tends to destroy, the sharpness of the outlines; and the
sulphurous and sulphuric acids of the prevailing smoke rapidly
corrode the surface of any bronze statue which is constantly being
washed. For these reasons, the Nelson monument at Liverpool, was
left untouched when it was re-erected, after the building of the new
Exchange surrounding it. It has been a matter of much debate
whether the soot-blackened surface of a bronze statue is not more
pleasing to the eye, than the metallic lustre of a new, or newly-
cleaned statue. (b) Weber finds that a dilute solution of caustic
alkalies removes overlying dirt, and allows the green patina to
become visible. Where the metal was not originally oxidised, the
alkali simply cleanses it, and does not promote any formation of
green rust. (c) By dipping fustian in soluble glass, and washing it
with soap directly afterwards, we get a fabric largely impregnated
with silica, which will be found very well adapted for cleaning
bronzes, &c. Samples of the material were in the Vienna Exhibition,
and attracted some notice. (d) The method of restoring a bronze
tea-urn turned black in parts will depend, to a great extent, on the
metal and the colour. Clean the surface, first of all, with whiting and
water, or crocus powder, until it is polished; then cover with a paste
of graphite and crocus, mixed in the proportions that will produce
the desired colour. Heat the paste over a small charcoal fire. If the
bronzing has been produced by a corrosive process, try painting a
solution of potassium sulphide over the cleaned metal. There are
many recipes for bronzing, and it is impossible to say which is
suitable. The bronzed surface may be polished; but it cannot be
bright unless the surface of the metal itself is polished, and then
covered with transparent lacquer to preserve the brightness.
Coins.—Coins can be quickly cleansed by immersion in strong
nitric acid, and immediate washing in water. If very dirty, or corroded
with verdigris, it is better to give them a rubbing with ½ oz. pure
potash bichromate, 1 oz. sulphuric acid, 1 oz. nitric acid; rub over,
wash with water, wipe dry, and polish with rottenstone or chalk.
(Lyle.)
Copper Electros.—Copper electros should be well cleaned after
working, as the ink between the fine lines in time generates acids,
which destroy the electro. For this purpose turpentine and the brush
are employed; others also recommend the electros to be afterwards
well rubbed with an oil as free from acid as possible. Should the ink
be so dried up as to resist it, creosote should be applied, and the
electros treated with the brush.
Copper Vessels.—Use soft-soap and rottenstone, made into a stiff
paste with water, and dissolved by gently simmering in a water-bath.
Rub on with a woollen rag, and polish with dry whiting and
rottenstone. Finish with a leather and dry whiting. See also Brass.
Gas Chandeliers.—Very few chandeliers are gilt; they are
burnished and lacquered with yellow lacquer. Proceed as follows,
whether gilt or lacquered: Take the chandelier to pieces, and boil in
strong soda lye for a few minutes; brush over with a soft brush, pass
through a strong solution of potassium cyanide (deadly poison),
wash through a tubful of boiling water, dry in clean sawdust, wipe up
bright with a washleather, and relacquer.
Gilt Mountings.—Gilt mountings, unless carefully cleaned, soon
lose their lustre. They should not be rubbed; if slightly tarnished,
wipe them off with a piece of Canton flannel, or what is better,
remove them if possible, and wash in a solution of ½ oz. borax
dissolved in 1 lb. water, and dry them with a soft linen rag; their
lustre may be improved by heating them a little, and rubbing with a
piece of Canton flannel.
Gold.—(a) To remove the brown tarnish from coloured gold, take a
piece of tissue-paper damped in liq. ammoniæ, gently rub the gold
till the tarnish disappears, then wash off carefully with soft brush,
soap, and water, dry in sawdust or before the fire; if this is not
sufficient, entrust the article to a jeweller. (b) Mix a little rouge and
spirits of wine together, and apply to the jewellery with a rather stiff
brush, and turn the brush round and round—not to brush as if to
polish, but rather tickle it and pat it with the hair of the brush; but
be sure to keep the brush wet with the mixture. After you have got
the tarnish off, wash it out with soap and boiling water, and dry in
box-dust. Take care of any stones with foil behind. (c) Rub with a
piece of tissue-paper, screwed up and wet with the tongue. This will
often do it; if not, re-colour it. (d) A weak solution of potassium
cyanide will clean gold braid. Use with small sponge, and wash off
with clean water. Strength, say 10 or 15 gr. to the oz. of water. Care
should be taken that the solution does not get into any cuts or
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like